I have developed a Django powered web-pages where I am storing pretty much all content inside a database, let's say sqlite.db
Django properly reads all information from the database and displays the webpage correctly.
Using the admin interface however (on the production server -> the development server coming with the pydev plugin from Eclipse is working fine) the database cannot be accessed. If I just copy the database file it tells me it cannot read and I don't even get the log-on screen to the admin app of django. If I change the file and directory permissions as suggested in many forums I am getting the admin login screen, however django returns the "DatabaseError at /admin/ - database disk image is malformed" Error.
I am using Django 1.6.5 and sqlite3 3.7.13
Any ideas?
EDIT: I found out that only the main page of the django admin interface is affected. I can navigate to the app settings with no problems.
If you find the 'SQLite Database Disk Image is malformed' error, export your database into an SQL file. To export the data, click the File tab followed by Export>>Database to SQL file. The Export SQL dialog box appears on the screen; select the objects you want to export and define the other options.
You may see the "database disk image is malformed" error in TekRADIUS log. This could happen during unplanned shutdown or reboot. The error indicates that one or more of the sqlite3 databases may have become corrupted. You need to have sqlite3.exe to diagnose and fix the problem.
Only three steps.
db.sqlite3
and all migrations filespython manage.py makemigrations
python manage.py migrate
As Joel pointed out "SQLite3 database or disk is full / the database disk image is malformed" has a solution in its comment sections (https://askubuntu.com/questions/30185/banshee-encountered-a-fatal-error-sqlite-error-11-database-disk-image-is-malfo). Thank you Joel Goldstick for the help!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With