Keep Getting The Error Typeerror: Function Takes At Most 2 Arguments (3 Given)
I am currently working on my coursework project for college which involves a quiz which stores all background data in a database. With the addition of foreign keys, i have tried t
Solution 1:
cursor.execute
takes 2 arguments (the query and the query args tuple), yet you are passing it 3 arguments: cursor.execute("insert into Data (Level, UsersID) VALUES (?,?)",(difficulty),(users_id))
You should change (difficulty),(users_id)
to a 2-elements tuple, (difficulty, users_id)
:
cursor.execute("insert into Data (Level, UsersID) VALUES (?,?)", (difficulty, users_id))
Post a Comment for "Keep Getting The Error Typeerror: Function Takes At Most 2 Arguments (3 Given)"