g_ESRI_variable and arcgis server Data Store

01-31-2023 01:51 AM
New Contributor II

Hi, Im having trouble with the added "g_ESRI_variable", when publishing a script tool as an geoprocessing service. I see several posts on this topic, and it seems that the g_ESRI_variable should not appear if the, in my case folder, is set in the Data Store (arcgis server manager).

Do I understand this correctly?

In detail: I write files to C:\inetpub\wwwroot\plot. This folder is added as a Data Store. Still, after publishing the script is rewritten to g_ESRI_variable_1 = os.path.join(arcpy.env.packageWorkspace,'plot'). 

When manually adjusting the g_ESRI_variable_1 to g_ESRI_variable_1 = r'C:\inetpub\wwwroot\plot' the service seems to work and write files to this folder.

Any pointers to why this happens even if folder is registered in Data Store ?

0 Kudos
0 Replies