понедельник, 8 октября 2012 г.

SQLite objects created in a thread can only be used in that same thread

Объект соединения с базой данных использовался во всех потоках. В итоге получал данную ошибку:
ProgrammingError: SQLite objects created in a thread can only be used in that same thread.The object was created in thread id -1220073264 and this is thread id -1233679472

Решение:
conn = sqlite3.connect('checker.db', check_same_thread=False)
 

Комментариев нет:

Отправить комментарий