findAndReplaceWorkspacePaths is crashing Python script

Discussion created by jt1qc on Apr 18, 2012
Latest reply on Sep 10, 2012 by jrflannery
I am trying to change the layers data source in a map document, from the current SDE connection to the new SDE connection, using Python. I had used the example given in the ArcGIS Desktop Help 10.0 (http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s30000004p000000), but the script keep crashing when it gets to the mxd.findAndReplaceWorkspacePaths line.

Here is the code. Any suggestion will be greatly appreciated. Thank you.

import arcpy
mxd = arcpy.mapping.MapDocument(r"I:\RepointMXD.mxd")
mxd.findAndReplaceWorkspacePaths(r"I:\current_sde.sde", r"I:\new_sde.sde")
del mxd