I'm attempting to delete some features from a feature class using an
arcpy.da.UpdateCursor. The line
uc.deleteRow() throws an exception with the message
iteration not started.
where_clause is "item_no in (123,456,789)"; return records with a value in this field found in this comma-delimited list. Here is the where clause being passed in
ITEM_NO in (1,8,9).
To remove the
where_clause as a possible source of this problem, I hard-coded a single value into the where; "item_no = 123". This also threw the error.
If I change this to a
searchCursor using the same parameters, three records are returned, as expected.
with arcpy.da.UpdateCursor(fc, "OBJECTID", where_clause=strWhere) as uc: for row in XYZ: try: uc.deleteRow() except Exception, e: print e
What am I doing wrong and how do I get around this?