<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic A geoprocessing service fails because the server adds two strings to the data variables in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/a-geoprocessing-service-fails-because-the-server/m-p/1274981#M67925</link>
    <description>&lt;P&gt;I have a geoprocessing service that breaks because the server adds two strings to the data variables. The code snippet is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;dir_path = r'e:\ArcGISData\ForestEcosystemValuesData'
arcpy.AddMessage(dir_path)
# root = r'E:\ArcGISData\ForestEcosystemValuesData\ForestValuesApp.gdb'
workspace = os.path.join(dir_path, 'ForestValuesApp.gdb')
arcpy.env.workspace = workspace
arcpy.env.overwriteOutput = True
CS = 30
CONV = 0.000247105381
ZONEFIELD = 'SAID'
AOITotalAreaAcres = 0
root = arcpy.env.workspace
urban = os.path.join(root, 'AOIUrbanVector')
rasterList = ['uBiodiversity', 'uClimate',  'uCultural', 'uEconomic',  'uHumanHealth', 'uWatershed',  'rBiodiversity', 'rClimate', 'rCultural', 'rWatershed']
tempPolygon = r'in_memory\temp1'
memo = "in_memory"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And when I open the script on the server folder I have this, it adds a string (a') to one of the variables and another string (db') to the other variable:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;g_ESRI_variable_1&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;'E:&lt;/SPAN&gt;&lt;SPAN&gt;\\&lt;/SPAN&gt;&lt;SPAN&gt;ArcGISData&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t;DIV&gt;&lt;SPAN&gt;g_ESRI_variable_8&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;'UrbanID'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WilsonIonara_0-1680555075399.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/67137i7B0F8AA0BB97322F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="WilsonIonara_0-1680555075399.png" alt="WilsonIonara_0-1680555075399.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this is the error returned on the app:&amp;nbsp;&lt;/P&gt;&lt;P&gt;File "E:\arcgisserver\directories\arcgissystem\arcgisinput\ForestEcosystemValues\EcoNewGP.GPServer\extracted\p20\forestecosystemvaluesdata\LATEST_CHANGEURBANNOPARAMS CLEAN NO PARAMS3.py", line 5&lt;BR /&gt;g_ESRI_variable_1 = 'E:\\ArcGISData\\ForestEcosystemValuesData'a'&lt;BR /&gt;^&lt;BR /&gt;SyntaxError: invalid syntax&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WilsonIonara_1-1680555206187.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/67138i8D78F49DC687D2A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="WilsonIonara_1-1680555206187.png" alt="WilsonIonara_1-1680555206187.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My coworkers are able to publish the geoprocessing service with no errors. What is going with my publishing? Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Apr 2023 20:55:36 GMT</pubDate>
    <dc:creator>WilsonIonara</dc:creator>
    <dc:date>2023-04-03T20:55:36Z</dc:date>
    <item>
      <title>A geoprocessing service fails because the server adds two strings to the data variables</title>
      <link>https://community.esri.com/t5/python-questions/a-geoprocessing-service-fails-because-the-server/m-p/1274981#M67925</link>
      <description>&lt;P&gt;I have a geoprocessing service that breaks because the server adds two strings to the data variables. The code snippet is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;dir_path = r'e:\ArcGISData\ForestEcosystemValuesData'
arcpy.AddMessage(dir_path)
# root = r'E:\ArcGISData\ForestEcosystemValuesData\ForestValuesApp.gdb'
workspace = os.path.join(dir_path, 'ForestValuesApp.gdb')
arcpy.env.workspace = workspace
arcpy.env.overwriteOutput = True
CS = 30
CONV = 0.000247105381
ZONEFIELD = 'SAID'
AOITotalAreaAcres = 0
root = arcpy.env.workspace
urban = os.path.join(root, 'AOIUrbanVector')
rasterList = ['uBiodiversity', 'uClimate',  'uCultural', 'uEconomic',  'uHumanHealth', 'uWatershed',  'rBiodiversity', 'rClimate', 'rCultural', 'rWatershed']
tempPolygon = r'in_memory\temp1'
memo = "in_memory"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And when I open the script on the server folder I have this, it adds a string (a') to one of the variables and another string (db') to the other variable:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;g_ESRI_variable_1&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;'E:&lt;/SPAN&gt;&lt;SPAN&gt;\\&lt;/SPAN&gt;&lt;SPAN&gt;ArcGISData&lt;/SPAN&gt;&lt;SPAN&gt;\\&lt;/SPAN&gt;&lt;SPAN&gt;ForestEcosystemValuesData'&lt;/SPAN&gt;&lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN&gt;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&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WilsonIonara_0-1680555075399.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/67137i7B0F8AA0BB97322F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="WilsonIonara_0-1680555075399.png" alt="WilsonIonara_0-1680555075399.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this is the error returned on the app:&amp;nbsp;&lt;/P&gt;&lt;P&gt;File "E:\arcgisserver\directories\arcgissystem\arcgisinput\ForestEcosystemValues\EcoNewGP.GPServer\extracted\p20\forestecosystemvaluesdata\LATEST_CHANGEURBANNOPARAMS CLEAN NO PARAMS3.py", line 5&lt;BR /&gt;g_ESRI_variable_1 = 'E:\\ArcGISData\\ForestEcosystemValuesData'a'&lt;BR /&gt;^&lt;BR /&gt;SyntaxError: invalid syntax&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WilsonIonara_1-1680555206187.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/67138i8D78F49DC687D2A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="WilsonIonara_1-1680555206187.png" alt="WilsonIonara_1-1680555206187.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My coworkers are able to publish the geoprocessing service with no errors. What is going with my publishing? Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 20:55:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/a-geoprocessing-service-fails-because-the-server/m-p/1274981#M67925</guid>
      <dc:creator>WilsonIonara</dc:creator>
      <dc:date>2023-04-03T20:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: A geoprocessing service fails because the server adds two strings to the data variables</title>
      <link>https://community.esri.com/t5/python-questions/a-geoprocessing-service-fails-because-the-server/m-p/1275155#M67926</link>
      <description>&lt;P&gt;I think we are suffering with the same issue. Are you publishing using ArcGIS pro 3.*?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2023 10:53:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/a-geoprocessing-service-fails-because-the-server/m-p/1275155#M67926</guid>
      <dc:creator>Cristian_Galindo</dc:creator>
      <dc:date>2023-04-04T10:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: A geoprocessing service fails because the server adds two strings to the data variables</title>
      <link>https://community.esri.com/t5/python-questions/a-geoprocessing-service-fails-because-the-server/m-p/1275987#M67927</link>
      <description>&lt;P&gt;Yes, but I tried with ArcGIS Pro 2.X also and then upgraded to 3.1.0 but I am still having the same issue.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 21:05:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/a-geoprocessing-service-fails-because-the-server/m-p/1275987#M67927</guid>
      <dc:creator>WilsonIonara</dc:creator>
      <dc:date>2023-04-05T21:05:10Z</dc:date>
    </item>
  </channel>
</rss>

