AnsweredAssumed Answered

Objects in this class cannot be updated outside an edit session

Question asked by jparfitt on Feb 7, 2014
Latest reply on Feb 12, 2014 by jparfitt
I keeping getting the "Objects in this class cannot be updated outside an edit session" error message. I can't figure out why because it seems to be I'm opening an edit session. Is there a step I'm missing?

Thank you in advance.


 arg_sdeDEV_sde = "Database Connections\\arg@sdeDEV.sde" ARG_ACCESS_OPENING = "Database Connections\\arg@sdeDEV.sde\\ARG.DistributionSystem\\ARG.ACCESS_OPENING" ACCESS_OPENING_Layer = "ACCESS_OPENING_Layer" Reconcile_Versions_Log = ""   # Process: Make Feature Layer tempEnvironment0 = arcpy.env.workspace arcpy.env.workspace = "Database Connections\\arg@sdeDEV.sde" arcpy.env.overwriteOutput = True arcpy.MakeFeatureLayer_management(ARG_ACCESS_OPENING, ACCESS_OPENING_Layer, "", arg_sdeDEV_sde, "OBJECTID OBJECTID VISIBLE NONE;OPEN_TYPE OPEN_TYPE VISIBLE NONE;REC_INFO_NAME REC_INFO_NAME VISIBLE NONE") arcpy.env.workspace = tempEnvironment0  # Process: Start Edit edit = arcpy.da.Editor(arcpy.env.workspace) edit.startEditing(True, False) edit.startOperation()  # Process: Select and Update Data cursor = arcpy.UpdateCursor(ARG_ACCESS_OPENING) for row in cursor:     row.setValue("STRUCTURE_ID", row.getValue("ENCLOSURE_ID"))     cursor.updateRow(row)

Outcomes