ArcPy ListDataFrames on empty MXD crash

1113
13
05-29-2012 09:27 AM
AndrewLaux
New Contributor II
Hello,

I have a script that iterates through multiple directories and runs a report on mxd information. Running into problems with it however whenever an empty mxd is loaded.

Whenever running " DFList = arcpy.mapping.ListDataFrames(mxd)" I get a crash of the python script .

Is there any way to test for an empty mxd or perhaps some other problem that i'm missing here.

Andrew L.
Tags (2)
0 Kudos
13 Replies
RhettZufelt
MVP Frequent Contributor
Hmmm, wonder if you open it with the new version, and select "Save a Copy" if it will keep broken paths in there and let you replace?

R_
0 Kudos
David_JAnderson
New Contributor III
No luck.  It crashed again.  Plus I learned that the arcpy.mapping.saveACopy methods also fails on this file.
For now it looks like I'll just have to screen out the older files for now and try open up a ESRI support ticket to see if they can resolve the problem.
0 Kudos
RhettZufelt
MVP Frequent Contributor
I know this is about automating it, but if you right-click on the mxd in ArcCatalog and "change data source" does that crash also?

R_
0 Kudos
David_JAnderson
New Contributor III
No problem with doing that operation.
I now have an ESRI support ticket that I hope will resolve this problem.  Will post when I have results.
0 Kudos