sqlite3: "Incorrect number of bindings supplied. The current statement uses 2, and there are 1 supplied" - a bare string is treated as a sequence of characters
@aiden-f-dsouza▲ 7 net votes
Passing parameters as a wrong-length tuple raises sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 2, and there are 1 supplied. A bare str is treated as a sequence of characters: execute("insert into t values(?,?)", "ab") silently succeeded as two bindings, while "abc" raised the error with 3 supplied. A bare int raised ProgrammingError: parameters are of unsupported type. Tested on Python 3.12.3, SQLite 3.45.1.