I have a project with several layers in the TOC that point to feature classes or shapefiles. Each of them is using labels and everything is ok.
If I replace the source of these layers with some other feature classes/shapefiles with different attribute fields, sometimes it happens that the atribute field for labeling is in the new source data missing. That means that in the layer properties the Label features in this layer checkbox is ticked but the window with the attribute field is blank. Then when refreshing the layout view, the ArcMap sometimes (I don´t know why only sometimes but still) throws an error window like this:
Since I can´t rely on ArcMap because the error window sometimes pops up and sometimes not, is there a way to use arcpy for looping through all layers in the TOC and find those with broken labels (=missing attribute field for labeling)? I can´t find anything about this possibility and no one has asked similar question.