laptop and a wrench

Bug

The addDataFromPath() function fails to add a feature class to the map in ArcGIS Pro if the project path is hardcoded and the referenced project is open.

ArcGIS Pro
Bug ID Number BUG-000159274
SubmittedJune 21, 2023
Last ModifiedJune 5, 2024
Applies toArcGIS Pro
Version found3.1.2
Operating SystemWindows OS
Operating System Version10.0 64 Bit
StatusAs Designed

Additional Information

This is as designed. In ArcGIS Pro 2.9 the capability to open already open projects as read-only. They same behavior changed in the UI as well. In this case, if you already have the referenced project open and you try to reference it again with arcpy.mp, you can NOT save changes to it. You would need to call saveACopy(). Also added an isReadOnly property to the ArcGISProject object.

Workaround

Use the CURRENT keyword rather than the project path if the code is being run within the desired project. Alternatively, make sure the referenced project is closed when running the addDataFromPath() function with a specified project path.

Steps to Reproduce

Bug ID: BUG-000159274

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