I'm having a great deal of difficulty overwriting files when using ArcSDE. The usual 'arcpy.env.overwriteOutput' method doesn't seem to work.
When I run this script:
import arcpyfrom arcpy import envenv.workspace = "L:\\DRAINAGE\\D_GROUP6\\STAFF\\CJE\\EDRN_3.sde"arcpy.env.overwriteOutput = Trueselected_link = "L:\\DRAINAGE\\D_GROUP6\\STAFF\\CJE\\EDRN_3.sde\\VALLAHC.EDRN_LINK6"q_fid = 39edrn_node = "L:\\DRAINAGE\\D_GROUP6\\STAFF\\CJE\\EDRN_3.sde\\VALLAHC.EDRN_NODE6"join1 = "L:\\DRAINAGE\\D_GROUP6\\STAFF\\CJE\\EDRN_3.sde\\VALLAHC.join39"arcpy.MakeFeatureLayer_management(selected_link, "feature_layer10") arcpy.SelectLayerByAttribute_management("feature_layer10", "NEW_SELECTION", '\"OBJECTID_1\" = {0}'.format(q_fid))arcpy.SpatialJoin_analysis("feature_layer10", edrn_node, join1, "JOIN_ONE_TO_MANY", "#", "#", "CONTAINS")I get the following error:
Runtime error : ERROR 000601: Cannot delete L:\DRAINAGE\D_GROUP6\STAFF\CJE\EDRN_3.sde\VALLAHC.join39. May be locked by another application. Failed to execute (SpatialJoin).I have attempted to get around this in a number of ways:
أكثر...
When I run this script:
import arcpyfrom arcpy import envenv.workspace = "L:\\DRAINAGE\\D_GROUP6\\STAFF\\CJE\\EDRN_3.sde"arcpy.env.overwriteOutput = Trueselected_link = "L:\\DRAINAGE\\D_GROUP6\\STAFF\\CJE\\EDRN_3.sde\\VALLAHC.EDRN_LINK6"q_fid = 39edrn_node = "L:\\DRAINAGE\\D_GROUP6\\STAFF\\CJE\\EDRN_3.sde\\VALLAHC.EDRN_NODE6"join1 = "L:\\DRAINAGE\\D_GROUP6\\STAFF\\CJE\\EDRN_3.sde\\VALLAHC.join39"arcpy.MakeFeatureLayer_management(selected_link, "feature_layer10") arcpy.SelectLayerByAttribute_management("feature_layer10", "NEW_SELECTION", '\"OBJECTID_1\" = {0}'.format(q_fid))arcpy.SpatialJoin_analysis("feature_layer10", edrn_node, join1, "JOIN_ONE_TO_MANY", "#", "#", "CONTAINS")I get the following error:
Runtime error : ERROR 000601: Cannot delete L:\DRAINAGE\D_GROUP6\STAFF\CJE\EDRN_3.sde\VALLAHC.join39. May be locked by another application. Failed to execute (SpatialJoin).I have attempted to get around this in a number of ways:
- versioning/not versioning the data.
- Checking/unchecking the overwrite geoprocessing operations box in geoprocessing options.
- Using 'arcpy.Delete_management()' to delete the join at the end of the script. But SDE won't let me and outputs the same 000601 error.
أكثر...