filter = 'LinkID IS NOT NULL' cur1 = arcpy.UpdateCursor("ODDS_Links", filter) high_id = 0 for row1 in cur1: if high_id < row1.LinkID: high_id = row1.LinkID filter2 = 'LinkID IS NULL' cur2 = arcpy.UpdateCursor("ODDS_Links", filter2) i = high_id for row2 in cur2: i+=1 row2.LinkID = str(i) cur2.updateRow(row2)
The error I am getting is below. I know this works without the counter but something is wrong with counter and it won't add by one. If I comment out the counter it displays the error. I know I should use da but really don't feel like changing things around when I am so close.
TypeError: coercing to Unicode: need string or buffer, int found