AnsweredAssumed Answered

arcpy.da.Editor - RuntimeError: start edit session

Question asked by jskinner-esristaff Employee on Nov 28, 2016
Latest reply on Mar 22, 2019 by Sigam_geo



ArcGIS 10.4.1

SQL Server 2014


I’m trying to update a versioned feature class within an enterprise geodatabase with the following script:


import arcpy
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
edit.startEditing(False, True)

# Update field
with arcpy.da.UpdateCursor(fc, ['County']) as cursor:
    for row in cursor:
        row[0] = 'test'

# Stop Edit Session

del cursor


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?