taylor65

trouble with python cursors - trying to put value from table into another

Discussion created by taylor65 on Sep 9, 2011
Latest reply on Sep 12, 2011 by stacyrendall
Hi, I'm trying to place a value from one table into another via python. I am using a combination of SearchCursors and UpdateCursors to accomplish this. I am currently getting the error:

Row: Invalid input value for setting


Here's my code thus far:

date = arcpy.SearchCursor(START_END_Select, "", "", "DATE_CODE")
bank = arcpy.SearchCursor(START_END_Select, "", "", "BANK_SIDE")
field = arcpy.UpdateCursor(updated_file)

for item in date:
        date = date
for item in bank:
        bank = bank
for item in field:
        item.DATE_CODE = date
        item.BANK_SIDE = bank
        field.updateRow(item)


I should mention a bit about the data. They are small tables from point and line files. START_END_Select is a selection of two points where the field entries I am getting data from are identical, that is they are two separate points with the same BANK_SIDE and DATE_CODE data for each entry. I let SeachCursors iterate to the last record, then assign each record to a variable, then assign each variable to the appropriate field in the update record.

The error occurs in the first line of code after 'for item in field:'.

Thanks for the help!

Outcomes