Timeline for StopIteration: iteration not started error in arcpy.da.UpdateCursor
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 20, 2017 at 1:55 | history | edited | Emil Brundage | CC BY-SA 3.0 |
added 1 character in body
|
Sep 19, 2017 at 22:52 | vote | accept | grego | ||
Sep 19, 2017 at 22:52 | comment | added | grego | Thanks! This is gold. The continue keyword is totally what I needed to allow me to delete these rows at the top of the "for row in cursor" loop, before continuing to calculate other fields in each row, ending each iteration with a properly-indented cursor.updateRow(row) | |
Sep 19, 2017 at 22:02 | comment | added | Emil Brundage |
I've edited my response by adding a continue .
|
|
Sep 19, 2017 at 22:02 | history | edited | Emil Brundage | CC BY-SA 3.0 |
added 90 characters in body
|
Sep 19, 2017 at 20:24 | comment | added | grego | Thanks Emil, but for clarity I have edited my code down to the basics.. there's actually about 100 lines in there, so many other branches. Some rows are deleted outright, most have a field value calculated based on other fields. I think the problem is with the branching logic; when my script reaches the cursor.updateRow(row) , I guess it's saying "I can't update this row in the FC because you haven't iterated anything yet". | |
Sep 19, 2017 at 19:29 | history | edited | Emil Brundage | CC BY-SA 3.0 |
deleted 9 characters in body
|
Sep 19, 2017 at 19:08 | history | answered | Emil Brundage | CC BY-SA 3.0 |