laptop and a wrench

Bug

The legend element in an ArcGIS Pro project does not show the newly added layer to an existing map using ArcPy.

Last Published: April 29, 2019 ArcGIS Pro
Bug ID Number BUG-000121607
SubmittedApril 9, 2019
Last ModifiedJuly 31, 2025
Applies toArcGIS Pro
Version found2.3.2
Version Fixed2.4
StatusFixed

Workaround

From our testing we found two workarounds:

  1. This only happens for scripts run outside of Pro. Scripts in the Python Window work as well as script tools.
  2. To remedy the problem outside of Pro, all you need to do is reference the layout first using

lyt = p.listLayouts()[0]   

 

BEFORE adding the layers to a map.

Steps to Reproduce

Bug ID: BUG-000121607

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