Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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 27,918 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