for lyr in updateMap.listLayers():
if lyr.supports("DATASOURCE"):
arcpy.AddMessage(lyr.dataSource)
A script opens an ArcGIS Pro project file, goes through the list of layers within a map, checks to see if each layer supports the 'DataSource' property before giving me a message with that datasource
The script fails as it reaches a layer which doesn't support the 'DataSource' property....
NameError: The attribute 'dataSource' is not supported on this instance of Layer.
Can someone explain this non-sensical behaviour to me?
ArcGIS Pro 2.8.2