AnsweredAssumed Answered

The requested operation is invalid on a closed state

Question asked by kamyaka.kasani on Feb 7, 2018
Latest reply on Feb 7, 2018 by bixb0012

While updating the field using update cursor. Getting the error:The requested operation is invalid on a closed state. Here is my code:

editor = arcpy.da.Editor(workspace)

editor.startEditing(False, True)
editor.startOperation()
cursor = arcpy.da.UpdateCursor(<>feature_class,[<fields>]) 

 

for row in cursor:

# updation stuff comes here 

cursor.updateRow(row)

 

del row
del cursor 
editor.stopOperation() 
editor.stopEditing(True)
del editor

 

I appreciate any help or suggestions.

Outcomes