Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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 28,720 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