File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\arcobjects\mixins.py", line 443, in __init__
assert (os.path.isfile(mxd) or (mxd.lower() == "current")), gp.getIDMessage(89004, "Invalid MXD filename")
AssertionError: Invalid MXD filename.
mxd = arcpy.mapping.MapDocument("DSM2_Network.mxd")
Does it fail if you use the full path to your arcmap document?
mxd = arcpy.mapping.MapDocument("D:/delta/GIS/DSM2/DSM2_Network.mxd")
import arcpy, os, time from arcpy.mapping import * workspace = "D:/delta/GIS/DSM2" mxd = arcpy.mapping.MapDocument("DSM2_Network.mxd")
A string that includes the full path and file name of an existing map document (.mxd) or a string that contains the keyword CURRENT.