After 11 years our work group filesystem holds a lot of old arcmap project mxds and layer files. Also our geodatasources need some reorganization. So I wanted to create a script which iterates through the whole directory tree (with os.walk()),opening every mxd and lyr file, iterating through the TOC and persisting datasource information in an external table for review. Should be easy with arcpy.mapping .........I thought.
The script is very straightforward, but I am facing strange error behaviour, which I don't know from the other arcpy functions beside arcpy.mapping. Calling arcpy.mapping.MapDocument() or arcpy.mapping.ListLayers() on some MXDs cause arcpy to crash. And I mean not only "raise-an-exception-and-good-bye" crash, I mean a "killing-the-python-interpreter-absolutely-silently" crash, which is very annoying, because even a try-except block cannot keep my script running. There has to run something terribly wrong when even the python interpreter is going down.
I don't know exactly why some MXDs cause this, but I think it has to do with special characters and german "umlaut" letters in datasource paths.
I am wondering if somebody else is facing the same problem and can confirm this behaviour and perhaps tell me a workaround. Otherwise arcpy.mapping would be only useful in a very restricted way.