I have a geoprocessing service that breaks because the server adds two strings to the data variables. The code snippet is:
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"
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:
And this is the error returned on the app:
File "E:\arcgisserver\directories\arcgissystem\arcgisinput\ForestEcosystemValues\EcoNewGP.GPServer\extracted\p20\forestecosystemvaluesdata\LATEST_CHANGEURBANNOPARAMS CLEAN NO PARAMS3.py", line 5
g_ESRI_variable_1 = 'E:\\ArcGISData\\ForestEcosystemValuesData'a'
^
SyntaxError: invalid syntax
My coworkers are able to publish the geoprocessing service with no errors. What is going with my publishing? Thanks
I think we are suffering with the same issue. Are you publishing using ArcGIS pro 3.*?
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.