error with

Discussion created by niklas24 on Apr 9, 2012
Latest reply on May 27, 2015 by jquist1
I'm trying to use arcpy to save an .mxd and am having an issue. It doesn't matter if I use or mxd.saveACopy I get the same error. I know it doesn't look like I am doing anything w/ it here, but it's just a portion of my code that I've pulled out into a separate script to test:

import arcpy
import arcpy.mapping as map

mxd = map.MapDocument(r"C:\MGIS\Finalproject2.mxd")

I get the following error:

Traceback (most recent call last):
  File "C:\Python26\ArcGIS10.0\Lib\site-packages\pythonwin\pywin\framework\", line 312, in RunScript
    exec codeObject in __main__.__dict__
  File "C:\MGIS\geog485\FinalProject2\", line 7, in <module>
  File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\", line 181, in fn_
    return fn(*args, **kw)
  File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\", line 668, in saveACopy
AttributeError: MapDocObject: Unable to save.  Check to make sure you have write access to the specified file and that there is enough space on the storage device to hold your document.

Space is not the issue, I have 60 GB of free space and I've checked the windows properties of the .mxd file. Read-only box is unchecked and I've "allowed" all permissions for all groups:


Does anyone have any idea how if this is a bug or how I can fix this?  It's probably user error but is really holding me up. I'm using PythonWin 2.6 ArcInfo 10.0 SP4.

Thanks in advance.