+ 1
How to fix database is locked error ?
When I do some stuff in my database in sqlite3 I get "OprtationalError: database is locked" how to fix it manually or automatically please ?
1 ответ
+ 1
You can try giving the program a longer timeout time to complete it's transaction, default is 5 seconds i believe;
connection = sqlite.connect('cache.db', timeout=10)