laptop and a wrench

Bug

Default environment variables set in an ArcGIS Pro 2.4 Python script are incorrectly inherited when published to ArcGIS Server 10.7.

Last Published: July 29, 2019 ArcGIS Pro
Bug ID Number BUG-000123589
SubmittedJuly 9, 2019
Last ModifiedFebruary 7, 2025
Applies toArcGIS Pro
Version found2.4
Operating SystemWindows OS
Operating System Version10.0 64 Bit
Version Fixed2.4.2
StatusFixed

Workaround

Manually delete the addition line:

arcpy.env.workspace = arcpy.arcpy.env.packageWorkspacepy.env.packageWorkspace.scratchGDB

 

Publish the following simplified script to ArcGIS Server after registering a folder with server:

import arcpy

arcpy.env.workspace = r'C:\Users\<username>\Documents\ArcGIS\Projects\PythonWorkspace'

scratchWorkspace = arcpy.env.scratchGDB

arcpy.AddMessage(arcpy.env.workspace)

 

ArcGIS Server changed this to:

import arcpy

arcpy.env.workspace = arcpy.env.packageWorkspace

scratchWorkspace = arcpy.env.scratchGDB

arcpy.AddMessage(arcpy.env.workspace)

This script does run.

Steps to Reproduce

Bug ID: BUG-000123589

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