Select to view content in your preferred language

Trouble updating attribute table using arcpy.UpdateCursor

823
2
09-24-2019 11:17 AM
by Anonymous User
Not applicable

I am trying to update a column with data from a different attribute table using arcpy.UpdateCursor()

When I run my script it does not return an error, but it does not save the updated value to the table either. 

I have attached a screenshot of my code. 

Any and all suggestions are greatly appreciated.Code Screenshot

0 Kudos
2 Replies
JoshuaBixby
MVP Esteemed Contributor

My first suggestion is don't use Cursor—Help | ArcGIS Desktop , use UpdateCursor—Help | ArcGIS Desktop.

Also, sharing with Python

0 Kudos
EarlMedina
Esri Regular Contributor

Hi Hannah, 

In your first function, you use an Update Cursor but aren't updating any values. A Search Cursor would be more appropriate. If I understand what you're trying to do correctly, I believe your question is touched upon in some older posts - you can check these two for guidance:

-Earl

0 Kudos