How to fix "file is not a database" in apps, DB Browser for SQLite
sqlite3.DatabaseError: file is not a database
What this error means
The 16-byte header that identifies a SQLite file is damaged, or the database is encrypted (for example by SQLCipher).
Why it happens
- Header overwritten by storage errors
- An encrypted database
How to fix it
- Check whether the app encrypts its database — encrypted databases need their key
- Upload it here: if the header is damaged we restore it and copy out your tables
About SQLite database files
SQLite stores a whole database in one file of fixed-size pages. Damage to a few pages makes SQLite refuse the entire database, but rows on healthy pages can still be read and copied out.