ArcMap 10.5.1
In Problems with an Update Cursor I noted that I received an error upon running an update cursor on a table view. I just ran it again and got:
Runtime error
Traceback (most recent call last):
File "<string>", line 10, in <module>
RuntimeError: The operation is not supported within an edit session.
with arcpy.da.UpdateCursor('ba_view',fields)as updatecursor:
for row in updatecursor: # this is line 10 the error refers to....
I suspect my lack of experience with update cursors is the root cause; I ran it in an edit session in ArcMap to get the error. I don't get the error outside of an edit session.
For some reason, I thought update cursors needed to be run in an edit session: is that not the case?
Are you starting the edit session with ArcPy?
No. I open it in the ArcMap Session and run the update cursor code in the python window.
UpdateCursor—Data Access module | ArcGIS Desktop
perhaps you are overgeneralizing this note
Note:
Opening simultaneous insert or update operations on the same workspace using different cursors requires the start of an edit session.