Masahiro Okubo

sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread エラーの解決方法

sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread エラーの解決方法

こちらエラーの詳細内容です

sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread.The object was created in thread id 140736583877568 and this is thread id 123145388748800

 

解決方法

# check_same_threadをFalseにする
conn = sqlite3.connect("../../wnjpn-0.9.db", check_same_thread=False)

これでエラーを解決できました!

 

参考記事

【Python】ProgrammingError: SQLite objects created in a thread can only be used in that same thread


関連記事

copyright© 2016-2022 Masahiro Okubo