laptop and a wrench

Bug

Using the Python method hasattr() produces different error messages when used in ArcMap 10.7.1 versus ArcGIS Pro 2.5 (beta).

Last Published: August 23, 2021 ArcGIS Pro
Bug ID Number BUG-000128367
SubmittedFebruary 4, 2020
Last ModifiedApril 16, 2025
Applies toArcGIS Pro
Version found2.5 Beta
Operating SystemWindows OS
Operating System Version10.0 64 Bit
Version Fixed2.9
StatusFixed

Workaround

There are ArcPy capabilities to allow querying for a layer to get the attribute information. For example, querying 'lyr.dataSource' works as well. Refer to ArcPy - Layer

https://pro.arcgis.com/en/pro-app/arcpy/mapping/layer-class.htm for more information.

Steps to Reproduce

Bug ID: BUG-000128367

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