AttributeError: __exit__ when trying to use arcpy.UpdateCursor

المشرف العام

Administrator
طاقم الإدارة
I'm trying to populate a field from values of an existing field in a feature class using arcpy.UpdateCursor.

I'm getting this error: AttributeError: exit

Here's the chunk of code I'm using:

with arcpy.UpdateCursor(polyline, ["SEWER_TYPE"]) as cursor:

for row in cursor: if row.getValue("Layer") == "FUTURE_STORM": row.setValue("SEWER_TYPE", "STORM") cursor.updateRow(row)del row, cursor



أكثر...
 
أعلى