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 A Social Network with Flask Broadcasting Post Form and View

Dan Roney
seal-mask
.a{fill-rule:evenodd;}techdegree
Dan Roney
Python Development Techdegree Student 11,129 Points

I keep getting an error when running app.py, "database is locked"

I made sure everything matched the previous recommendation for create_user in the video on macros, but i am still getting an error message.

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, Dan Roney! This is a common issue, especially when debugging an app that has access to a database. The database is "stuck" so to speak. It's waiting for a write operation to complete, but there's no more information coming in. It can't move on until it completes, but it can't complete the operation either.

You need to shut down any process that is currently communicating with the database. If it's still reporting as "locked" then you may need to reboot your system. There's some process there that has it in a state where it can't finish, but can't start anything new either.

Hope this helps! :sparkles: