sqlite3 错误处理

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


解决方法:

self.connection = sqlite3.connect(self.database, timeout=3, isolation_level=None,check_same_thread=False)

设置同线程判断为false check_same_thread=False


猜你喜欢

转载自blog.csdn.net/blackj_liuyun/article/details/80856464
今日推荐