Hi,
I have been trying to select a number of features, delete some of them and update the rest. Like
edit = arcpy.da.Editor(workspace)
edit.startEditing(with_undo=True, multiuser_mode=False)
arcpy.AddMessage("Edit Session Started")
logging.info(f"Edit Session Started in : {workspace}")
try:
for id in Ids:
if id != Ids[0]
SearchCuror():
UpdateCursor()
deleteRow()
except arcpy.ExecuteError as e:
arcpy.AddMessage(f"Error: {e}")
for id in Ids:
SearchCuror():
UpdateCursor()
updateRow()
edit.stopOperation()
edit.stopEditing(save_changes=True)
But it encounters an error: Need an edit session
What am I doing wrong
Any advice is much appreciated