sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread.

 Lan   2020-07-17 02:24   288 人阅读  0 条评论

爬学校电费余额系统存到本地数据库时,开了多线程(车速过快),于是就报错了

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

QQ截图20200717022652.jpg在链接sqlite的时候加上check_same_thread=False即可

本文地址:https://www.lanol.cn/post/346.html
版权声明:本文为原创文章,版权归 Lan 所有,欢迎分享本文,转载请保留出处!

 发表评论


表情

还没有留言,还不快点抢沙发?