laptop and a wrench

Bug

Using arcpy.ListFields(layer.longName) in a loop on unopened maps causes error.

Last Published: September 21, 2020 ArcGIS Pro
Bug ID Number BUG-000133623
SubmittedSeptember 4, 2020
Last ModifiedJune 5, 2024
Applies toArcGIS Pro
Version found2.5.2
Operating SystemWindows OS
Operating System Version10.0
StatusWill Not Be Addressed

Additional Information

By using layer.name or layer.longName, the layer is passed only as a string. Without the relevant map is opened, the intended target is unknown. Use the layer object directly, for example, fields = arcpy.ListFields(layer)

Steps to Reproduce

Bug ID: BUG-000133623

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