laptop and a wrench

Error

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

Última publicación: April 29, 2019 ArcGIS Pro
Número de ID del error BUG-000121607
EnviadoApril 9, 2019
Última modificaciónJuly 31, 2025
Relacionado conArcGIS Pro
Versión encontrada2.3.2
Versión corregida2.4
EstadoFixed

Solución alternativa

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.

Pasos para reproducir

ID del error: BUG-000121607

Software:

  • ArcGIS Pro

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga