laptop and a wrench

Bug

When a Python script for a GP Tool is published from ArcGIS Pro to ArcGIS Enterprise, some paths are converted into alternative variables. These can cause the scripts or tools to fail with syntax errors.

Portal for ArcGIS
Bug ID Number BUG-000156284
SubmittedMarch 3, 2023
Last ModifiedJanuary 27, 2025
Applies toPortal for ArcGIS
Version found10.9.1
Operating SystemWindows OS
Operating System Version10.0
StatusAs Designed

Additional Information

These variables are expected to replace relative paths in python when published to ArcGIS Server.

Workaround

Limited success has been achieved in some scripts by writing paths differently. For example:

path = "\\Test$_TableToExcel.xlsx"

Output_Excel_File = cwd + os.path.join(path)

In this approach, a new variable for the network path is created, and os.path.join is used with the variable instead of directly typing the network path. This method resolves the syntax errors.

Steps to Reproduce

Bug ID: BUG-000156284

Software:

  • Portal for ArcGIS

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options