Error binding parameter 0: probably unsupported type Error binding parameter 0: probably unsupported type sqlite sqlite

Error binding parameter 0: probably unsupported type


Nested lists, tuples are used for executemany, not for execute.

Pass a flat list (or tuple) that contians parameters.

res = sakila.execute(    "SELECT first_name, last_name FROM customer WHERE last_name = ?",    (last,))

or

res = sakila.execute(    "SELECT first_name, last_name FROM customer WHERE last_name = ?",    [last])


I was getting the same error, sorted out that my data type was mismatched. I then converted it into string;

cursor.execute('''INSERT INTO employees VALUES (?);''', (str(data[0]), ))

and it worked fine. Hope this will be helpful for someone.