当前位置:网站首页 > 更多 > 编程开发 > 正文

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

作者:CC下载站 日期:2020-07-17 00:00:00 浏览:53 分类:编程开发

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

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.

在链接sqlite的时候加上check_same_thread=False即可

您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

关灯