laptop and a wrench

Bug

Including arcpy.env.workspace in a string in a Python argument in an embedded script tool in ArcGIS Pro results in a g_ESRI_variable being added to the script when the project is shared as a template which can sometimes break the script.

Last Published: March 26, 2019 ArcGIS Pro
Bug ID Number BUG-000115414
SubmittedJuly 17, 2018
Last ModifiedFebruary 14, 2025
Applies toArcGIS Pro
Version found2.2
Operating SystemWindows OS
Operating System Version7.0 64 Bit
Version Fixed2.5.1
StatusFixed

Workaround

1. Add the toolbox manually rather than saving as a template.

2. Replace the arcpy.env.workspace with the equivalent variable.

3. Remove the arcpy.env.workspace variable completely if not necessary.

Steps to Reproduce

Bug ID: BUG-000115414

Software:

  • ArcGIS Pro

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