ArcGIS Pro mangles variables when publishing a toolbox as a GP Service.

164
0
3 weeks ago
NikMartin
New Contributor II

This is mostly a rant, but also a bug report and a warning!

We have a GP toolbox in the legacy .pyt format that started throwing "Error 000816: The tool is invalid" errors for some unknown reason. After several support calls with ESRI, the only workaround was to re-create the GP Tool as an .atbx. We did that and the tool deployed fine, but was not working as it was previously. After a few weeks of troubleshooting, I was poking around in the deployed version of the toolbox (in the arcgisserver folders) and noticed the file structure inside the toolbox folder was different than the uncompiled version, and there were three empty folders in there, 'oracle, oracle1 and oracle11'. We have a constant in a config file in our code that specifies the specific flavor of SDE DB we're using, because there are differences between the various database engines. We set a constant named 'DB_TYPE='oracle'. For some maddeningly unknown reason, ArcGIS Pro decided that the constant 'oracle' needed to be something else, so it modified our config files! It created a new variable named 'g_ESRI_variable_1' and set it to os.path.join(arcpy.env.packageWorkspace,'oracle'), then set DB_TYPE = g_ESRI_variable_1! WHY!? Why would Pro do this to a variable that has nothing to do with the location or path to anything? Also, I didn't create the 'oracle' folders in the project source, why did Pro think it needed to create three empty folders named oracle? This has cost us over 80 hours of troubleshooting and is very frustrating. We're over 2 weeks behind delivering to a client because of this. 

Tags (2)
0 Kudos
0 Replies