clm42

da.editor throwing error

Discussion created by clm42 on Sep 16, 2014
Latest reply on Sep 18, 2014 by clm42

Getting an error when I run this. Cant see why. Any ideas?

 

with arcpy.da.Editor(r"D:\GIS-DATA\bay-arcgis-pro@sde@sde.sde"):
    with arcpy.da.UpdateCursor(production_parcels,'OID@') as cursor:
                    for row in cursor:
                        if row[0] in delete_OIDs:
                            cursor.deleteRow()                       
    with arcpy.da.UpdateCursor(staging_parcels,'OID@') as cursor:
                    for row in cursor:
                        if row[0] not in append_OIDs:
                            cursor.deleteRow()               
    arcpy.Append_management(staging_parcels,production_parcels,'NO_TEST')


Traceback (most recent call last):
** IDLE Internal Exception: 
  File "D:\Python27\ArcGISx6410.1\lib\idlelib\run.py", line 93, in main
    seq, request = rpc.request_queue.get(block=True, timeout=0.05)
  File "D:\Python27\ArcGISx6410.1\lib\Queue.py", line 177, in get
    self.not_empty.wait(remaining)
  File "D:\Python27\ArcGISx6410.1\lib\threading.py", line 262, in wait
    delay = min(delay * 2, remaining, .05)
RuntimeError: start edit session

Outcomes