Skip to main content
edited tags
Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345
added 12 characters in body
Source Link
Emil Brundage
  • 13.9k
  • 3
  • 27
  • 64

I cannot figure out why I keep getting this "StopIteration: iteration not started"error. I have confirmed the feature class 'vriTHLB_eliminated' exists and has records and all required fields.

Here is a simplified version of my code:

fieldList = ["SPECIES_CD_1","area_ha"]
with arcpy.da.UpdateCursor(vriTHLB_eliminated,fieldList) as cursor:` 
    for row in cursor:
        if row[0] == None or row[0] == "":  # If species 1 is null / absent / or empty string;
             cursor.deleteRow()             # delete these rows, they do not help with analysis.

        cursor.updateRow(row) #this definitely does need to indented inside the loop like this
del row, cursor

I cannot figure out why I keep getting this "StopIteration: iteration not started"error. I have confirmed the feature class 'vriTHLB_eliminated' exists and has records and all required fields.

Here is a simplified version of my code:

fieldList = ["SPECIES_CD_1","area_ha"]
with arcpy.da.UpdateCursor(vriTHLB_eliminated,fieldList) as cursor:` 
    for row in cursor:
    if row[0] == None or row[0] == "":  # If species 1 is null / absent / or empty string;
         cursor.deleteRow()             # delete these rows, they do not help with analysis.

    cursor.updateRow(row) #this definitely does need to indented inside the loop like this
del row, cursor

I cannot figure out why I keep getting this "StopIteration: iteration not started"error. I have confirmed the feature class 'vriTHLB_eliminated' exists and has records and all required fields.

Here is a simplified version of my code:

fieldList = ["SPECIES_CD_1","area_ha"]
with arcpy.da.UpdateCursor(vriTHLB_eliminated,fieldList) as cursor:` 
    for row in cursor:
        if row[0] == None or row[0] == "":  # If species 1 is null / absent / or empty string;
             cursor.deleteRow()             # delete these rows, they do not help with analysis.

        cursor.updateRow(row) #this definitely does need to indented inside the loop like this
del row, cursor
fixed grammar
Source Link
whyzar
  • 12.1k
  • 23
  • 39
  • 72

I cannot figure out why I keep getting this "StopIteration: iteration not started"error. I have confirmed the feature class 'vriTHLB_eliminated' exists and has records and all required fields.

Here is a simplified version of my code:

fieldList = ["SPECIES_CD_1","area_ha"]
with arcpy.da.UpdateCursor(vriTHLB_eliminated,fieldList) as cursor:` 
    for row in cursor:
    if row[0] == None or row[0] == "":  # If species 1 is null / absent / or empty string;
         cursor.deleteRow()             # delete these rows, they do not help with analysis.

    cursor.updateRow(row) #this definitely does need to indented inside the loop like this
del row, cursor

Any help would be greatly appreciated!

I cannot figure out why I keep getting this "StopIteration: iteration not started"error. I have confirmed the feature class 'vriTHLB_eliminated' exists and has records and all required fields.

Here is a simplified version of my code:

fieldList = ["SPECIES_CD_1","area_ha"]
with arcpy.da.UpdateCursor(vriTHLB_eliminated,fieldList) as cursor:` 
    for row in cursor:
    if row[0] == None or row[0] == "":  # If species 1 is null / absent / or empty string;
         cursor.deleteRow()             # delete these rows, they do not help with analysis.

    cursor.updateRow(row) #this definitely does need to indented inside the loop like this
del row, cursor

Any help would be greatly appreciated!

I cannot figure out why I keep getting this "StopIteration: iteration not started"error. I have confirmed the feature class 'vriTHLB_eliminated' exists and has records and all required fields.

Here is a simplified version of my code:

fieldList = ["SPECIES_CD_1","area_ha"]
with arcpy.da.UpdateCursor(vriTHLB_eliminated,fieldList) as cursor:` 
    for row in cursor:
    if row[0] == None or row[0] == "":  # If species 1 is null / absent / or empty string;
         cursor.deleteRow()             # delete these rows, they do not help with analysis.

    cursor.updateRow(row) #this definitely does need to indented inside the loop like this
del row, cursor
added 4 characters in body
Source Link
grego
  • 1.1k
  • 7
  • 19
Loading
Source Link
grego
  • 1.1k
  • 7
  • 19
Loading