SQL Server 2014
I’m trying to update a versioned feature class within an enterprise geodatabase with the following script:
from arcpy import env
env.workspace = r"D:\Data\GIS.sde"
fc = "Util_SW_outfall"
# Start an edit session
edit = arcpy.da.Editor(env.workspace)
# Change second parameter to True for versioned data
# Update field
with arcpy.da.UpdateCursor(fc, ['County']) as cursor:
for row in cursor:
row = 'test'
# Stop Edit Session
However, I receive the following error:
Traceback (most recent call last):
File "<string>", line 254, in run_nodebug
File "<module1>", line 21, in <module>
RuntimeError: start edit session
I was able to get the above to work with a File Geodatabase feature class. I feel like my turkey coma is allowing me to miss something simple, but can’t figure it out. Anyone have any suggestions?