r/pythonhelp • • Apr 25 '21

Tool code ArcPy

Hello I am coding a tool that is supposed to update a csv file and then diplay its x Y coordinates. I am currently just trying to get the insert row cursor part to work. this is what my code looks like so far and I keep getting the error

(Traceback (most recent call last):

File "C:/GISc450/BD_Proj/TESTADD.py", line 34, in <module>

main()

File "C:/GISc450/BD_Proj/TESTADD.py", line 29, in main

cursor.insertRow(row_vals)

TypeError: sequence size must match size of the row)

Not sure why this is, do you think it is my code or the table istelf?

2 Upvotes

1 comment sorted by

1

u/HeeebsInc Apr 26 '21

I’m guessing the fields list is different length than the number of columns in each row in the file. Can’t know for sure without seeing the file though.

Can you post the first couple of rows in the file?