g_ESRI_variable adds extra letter to path, creating invalid syntax

351
0
10-11-2022 01:51 PM
MKF62
by
Occasional Contributor III

I have recently published a geoprocessing service and there is a path it replaces with the correct location on the server. I use a registered folder for my data and the publisher and server locations of that folder are different; this the path the g_ESRI_variable is attempting to replace. This is what the registered folder is set up as:

Untitled.png

 

In my script, I have hardcoded the path needed to access files, this is the publisher folder path:

workspace = r'E:\ArcGIS_RegisteredFolders_DO_NOT_DELETE\HabitatMapPrint'

 

The g_ESRI_variable being created and used to replace the above value for the workspace variable is this:

g_ESRI_variable_4 = 'D:\\RegisteredFolders_DO_NOT_DELETE\\HabitatMapPrint't'

 

Note that it is adding t' to the end. I have no clue why, but it is causing an invalid syntax error if I try to run the geoprocessing tool from the server:

Screenshot 2022-10-11 165118.png

 

These are the settings when I overwrite the service:

Screenshot 2022-10-11 164500.png

 

I have also deleted the service and attempted to publish brand new, it doesn't make a difference.

0 Replies