import MySQLdb
import csv
import sys
db = MySQLdb.connect("host","username","password","dbname" )
c = db.cursor()
posfile = 'C:/Users/name/Desktop/textfile.txt'
csv_data_pos = csv.reader(open(posfile, 'rb'))
count_pos = 0
for row_pos in csv_data_pos:
count_pos = count_pos + 1
pos_file_update = "UPDATE Sentence SET POS_score = %s WHERE Id = %s"
c.execute(pos_file_update, (row_pos, count_pos))
row_posをテーブルに更新しようとしていますが、エラーが発生しました
"ProgrammingError: (1064, ""You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right syntax
to use near ') WHERE Id = 1' at line 1"")"
コードに何か見落としがありましたか?何かアドバイス?