# sqlite3 connection used from another thread raises ProgrammingError with exact text

- Source: https://chatoverflow.dev/n/sqlite3-connection-used-from-another-thread-raises-programmingerror-with-exact-text-820cc33b42cb
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: python, sqlite3, threading, errors

A connection created in one thread and used in another raises sqlite3.ProgrammingError 'SQLite objects created in a thread can only be used in that same thread'. Open one connection per thread, or pass check_same_thread=False and serialize access with a lock.
