I'm trying to update a table using a python script and it's not working. The table resides in a postgres geodatabase and is versioned. I have also verified my user permissions (I'm the admin). The version is public (i.e. not protected). The table properties show that the current user has select, insert, update, and delete privileges.
Here's my command
with arcpy.da.Editor(arcpy.env.workspace) as edit:
with arcpy.da.InsertCursor("service", ["service_id"]) as cur:
cur.insertRow([0])
The error:
Runtime error
Traceback (most recent call last):
File "<string>", line 3, in <module>
RuntimeError: The requested operation is invalid on a closed state [ugdb.sde.service]
edit.startEditing(True, True)and/oredit.startOperation()explicitely before using an Insert cursor? Does one of these fail? Have you tried the same on the Python Shell? – Jürgen Zornig Dec 10 '13 at 18:31