Error: unable to open database file
See original GitHub issueI did the following:
git clone git@github.com:cookiecutter-flask/cookiecutter-flask.git
/cookiecutter-docker.sh
...
cd app
docker-compose up flask-dev
I opened up the site at localhost:5000 and filled out the registration form. Upon submitting it I got the following error:
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file
(Background on this error at: http://sqlalche.me/e/e3q8)
There was a dev.db/
folder in the app
directory owned by root. This seemed strange …
I’m on Manjaro (Arch) Linux. Docker version: Docker version 19.03.4-ce, build 9013bf583a Docker-compose version: docker-compose version 1.24.1, build unknown
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
sqlite3.OperationalError: unable to open database file
Make sure each folder of your database file's full path does not start with number, eg. /www/4myweb/db (observed on Windows 2000).
Read more >Why do I get sqlite error, "unable to open database file"?
The solution is to make sure the directory containing the database file also has write access allowed to the process. In my case,...
Read more >How to Fix SQLite Unable to Open Database File Issue?
If SQLite is unable to open the database file, this means that the SQLite database you are trying to open is corrupted.
Read more >unable to open database file - SQLite Forum
Hi: I am shakoor, I develop a vb.net desktop application using SQLite database file, on updation of any table, it generate error "unable...
Read more >Why does leapp preupgrade fail with `sqlite3.OperationalError
Why does leapp preupgrade fail with `sqlite3.OperationalError: unable to open database file` traceback error ?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
True, docker-compose does that when you run
docker-compose [ up | run ]
, as it tries to mount that directory in the container. Run$ touch dev.db
before running the containers to create a dev.db file instead of a directory.Late response, but one clarification: If a directory named
dev.db
already exists,touch
ing it won’t have any effect. If you’ve already run into this issue, you need to delete the directory before runningtouch dev.db
(which ensures it exists as a file, not a directory).