UpdateCursor not updating from dictionary

المشرف العام

Administrator
طاقم الإدارة
I'm working through some UpdateCursor scripts to make updates to a fgdb. Although the script does not 'errro out' and my log file says completed successfully, the field values are not updated.Can anyone provide some guidance please as I have researched thsi quite significantly and cant get an answer after some hours of effort and no error message. (Using Win 7, ArcGIS 10.2, Python 2.7.5)

## Dictionary dict = {'7643': '7625', '9644': '2289', '4406': '4443', '7588': '9681', '2252': '7947'} ## Run UpdateCursor on featureclass 'shelves' which has fields 'book_id' and 'book_ref' updeets = arcpy.UpdateCursor('shelves',['book_id', 'book_ref']) for updateRow in updeets: if updateRow.Status in dict: updateRow.book_ref = dict[updateRow.book_id] updeets.updateRow(row) del updateRow, updeetsLog: 2015-08-20 12:46:51.611000Begin process: UpdateCursor_v2.py Process started at 2015-08-20 12:46:51.611000 Process completed successfully in 0:00:00.390000

أكثر...
 
أعلى