AnsweredAssumed Answered

Unable to save the MXD using external python script.

Question asked by krish.mandali on Jul 3, 2019
Latest reply on Jul 3, 2019 by krish.mandali

I am writing a small automation to create a view, register the view in Geo database and publish it as a service. So far good with creating a view and register with Geo database but I am trying to save the mxd before publishing it and its not working out. I saving the registered view in following ways and not working

mxd = arcpy.mapping.MapDocument("C:\GIS\testfile.mxd") 

Error: AssertionError: Invalid MXD filename.

------------------------------------------------------------

mxd = arcpy.mapping.MapDocument("CURRENT")


Error : RuntimeError: Object: CreateObject cannot open map documen

Outcomes