Python Using Databases in Python Gettin' CRUD-y With It Clean Up

Peter Gess
Peter Gess
16,553 Points

Any one else get a "Database is locked" error from peewee?

Any one else get a "Database is locked" error from peewee?

2 Answers

Jeff Muday
MOD
Jeff Muday
Treehouse Moderator 25,043 Points

I can't tell for certain without examining your machine's current process list, but you may have an active process that is holding the lock to the SQLite database.

I've "locked" a database before and had to search down the errant process and terminate it before I could regain access.

Check this link out-- it's pretty old, but still relevant

https://github.com/coleifer/peewee/issues/154

Yesh Loony
Yesh Loony
5,209 Points

I got that error also. It kind of hangs when you try to answer Y or N. Then you get this huge error