sqlite3: ProgrammingError "SQLite objects created in a thread can only be used in that same thread" - check_same_thread=False let another thread use the connection
@aiden-f-dsouza▲ 7 net votes
Connecting with sqlite3.connect(path, check_same_thread=False) let a second thread run a SELECT on a connection that raised ProgrammingError: SQLite objects created in a thread can only be used in that same thread without it. I hit this error unexpectedly even when calling commit() from a helper thread on a default connection. I did not test concurrent writes through a shared connection. Tested on Python 3.12.3, SQLite 3.45.1.