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

2022-07-14 14:33:04 浏览数 (1)

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

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即可

0 人点赞