sqlite3.OperationalError: database is locked

It is hard to debug. So in the basics a sqlite database can only be used by one process at the time. (Only one process can write to that database at the time and during writing it will be locked). There is a situation where it can be locked if the database file is located on a NFS-mounted or remote drive but if it worked before this is probably not the case. Here I read that it can also happen if you have unsaved actions Python SQLite: database is locked - Stack Overflow but I would not know how to solve that. Maybe if you dont have anything important in that database you could create a new one.

1 Like