My arcpy script includes two updateCursor Objects. The first iteration of the "outer" coursor works fine, but the programm stops when it comes to the second iteration at updateRow(). Has somebody an idea, where the problem could be?
Here is the code snippet:
arcpy.env.workspace = "I:/GIS/VoGIS_Projekte/Wanderwege/Basisdaten/Basisdaten_Sommer/wandern_SK.gdb"
# Use row object to get and set field values
cursor = arcpy.UpdateCursor("wanderwege/wander_wege_3d")
# Iterate through rows and update values
row_i = 1
wa_j = 1
for row in cursor:
print row_i
row.WEG_LAENGE = '999'
cursor.updateRow(row) # The 2nd iteration stops here...
wwege = arcpy.UpdateCursor("wanderwege/wander_wege")
for wa in wwege:
print wa_j
wa.WEG_KATEGO = "Kaps999"
wwege.updateRow(wa) # save
wa_j = wa_j + 1
del wwege
del wa
row_i = row_i + 1
del row
del cursor
I am working with: ArcGIS 10.2 Python 2.7 Windows 7
P.S.: I know, that this code doesn't make much sense - I just wanted to reproduce the error of a quite complicated script.