r/pythonhelp • u/_cantstandyaa_ • Jan 30 '21
Python Newbie, Can someone please help me with the error on line 37?
1
u/ryanrocket Jan 31 '21
I don’t know what the code is doing but it looks like it could be a problem with the Variable myCursor. If it’s affiliated with SQL, make sure it’s the right data type maybe
1
u/_cantstandyaa_ Jan 31 '21
Yeah the syntax for the cursor is UpdateCursor (in_table, field_names, {where_clause}, {spatial_reference}, {explode_to_points}, {sql_clause}, {datum_transformation}).
It's basically being used to calculate and update each row in a column of a table.
I think it's recognizing my field names as a {where clause} because that is where the SQL is needed but I'm just not sure why and if I have my bracket's wrong or something?
Thanks for your help!
1
u/ryanrocket Jan 31 '21
Yeah it looks like the error is coming from the SQL Syntax and not your python code. Might want to just run through it or hard type it or do it in a console until you get the query right
1
u/_cantstandyaa_ Jan 31 '21
oh I figured it out! It didn't like the spaces in the new title "Land Use Percent"