I am teaching myself ArcPy and I am attempting to make a code to replace paths to the items in my workspace. I had a file geodatabase and its path changed so I would like to automatically modify the path with ArcPy.
>>> mxd=arcpy.mapping.MapDocument("CURRENT") >>> arcpy.mapping.MapDocument.findAndReplaceWorkspacePaths(r"E:\GIS\_Wolverine Time\ArcGIS\California_DrinkingWater\Cali2.mdb",r"E:\GIS\California_DrinkingWater\Cali2.mdb")
I thought it was that simple but I received the following error:
Runtime error Traceback (most recent call last): File "<string>", line 1, in <module> TypeError: unbound method findAndReplaceWorkspacePaths() must be called with MapDocument instance as first argument (got str instance instead)