06-26-2009, 06:35 AM | #1 |
Provocateur
Posts: 1,859
Karma: 505847
Join Date: Feb 2009
Location: Columbus, OH
Device: Kindle Touch, Kindle 2, Kindle DX, iPhone 3GS
|
database disk image is malformed
I guess I'm hosed? I don't know what happened; I haven't run Calibre 0.6 in a few days but I believe it exited just fine the last time I used it. Now when I try to run it it gives me this error:
ERROR: Bad database location database disk image is malformed RemoteTrackback (most recent call last): File "calibre\library\sqlite.pyo", line 119, in run File "calibre\library\sqlite,pyo", line 85, in get DatabaseError: database disk image is malformed Attempts to reselect the same library gives the same error. |
06-26-2009, 11:34 AM | #2 |
creator of calibre
Posts: 44,356
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
One possible way to try to recover your database is to install the commad line sqlite tool and run it like this
sqlite3 metadata.db < .dump > dump.sql del metadata.db sqlite3 metadata.db < dump.sql This will try to dump your database to SQL statements and recover recreate it from that |
Advert | |
|
06-26-2009, 07:45 PM | #3 |
Provocateur
Posts: 1,859
Karma: 505847
Join Date: Feb 2009
Location: Columbus, OH
Device: Kindle Touch, Kindle 2, Kindle DX, iPhone 3GS
|
The < won't work for Windows. I figured out how to use .dump to make dump.sql but I have no idea how to reimport dump.sql into a new metadata.db.
|
06-26-2009, 07:47 PM | #4 |
Provocateur
Posts: 1,859
Karma: 505847
Join Date: Feb 2009
Location: Columbus, OH
Device: Kindle Touch, Kindle 2, Kindle DX, iPhone 3GS
|
Oh, wait, maybe it is working. It didn't seem to work on the first command line because it was a command and not an actual filename. But now it's importing the dump.sql, or at least it's acting like it.
SQL error near line 1: near "SQLite": syntax error But the rest seems to be going in. |
06-26-2009, 07:50 PM | #5 |
Provocateur
Posts: 1,859
Karma: 505847
Join Date: Feb 2009
Location: Columbus, OH
Device: Kindle Touch, Kindle 2, Kindle DX, iPhone 3GS
|
C:\Program Files\calibre 0.6>sqlite3 metadata.db < dump.sql
SQL error near line 1: near "SQLite": syntax error SQL error near line 28639: no such function: concat SQL error near line 28683: cannot commit - no transaction is active Incomplete SQL: sqlite> Okay, now what? |
Advert | |
|
06-26-2009, 08:01 PM | #6 |
Provocateur
Posts: 1,859
Karma: 505847
Join Date: Feb 2009
Location: Columbus, OH
Device: Kindle Touch, Kindle 2, Kindle DX, iPhone 3GS
|
Well, I copied the metadata.db over and it it's not working; it says it's in use by another process??? Even after rebooting it says that.
|
06-26-2009, 08:05 PM | #7 |
creator of calibre
Posts: 44,356
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It says the re-generated metadata.sql is in use by another process?
|
06-26-2009, 08:13 PM | #8 |
Provocateur
Posts: 1,859
Karma: 505847
Join Date: Feb 2009
Location: Columbus, OH
Device: Kindle Touch, Kindle 2, Kindle DX, iPhone 3GS
|
|
06-26-2009, 08:16 PM | #9 |
Provocateur
Posts: 1,859
Karma: 505847
Join Date: Feb 2009
Location: Columbus, OH
Device: Kindle Touch, Kindle 2, Kindle DX, iPhone 3GS
|
I believe my global.py somehow can confused. It says:
database_path = 'C:\\Documents and Settings\\Owner/library1.db' Which does not exist. Why it's giving me an error that it's in use, though, I have no clue. But the thing is, I get a pop-up to specify a new directory, and when I do that it *still* errors out. I'm going to restore the old metadata.db and change the settings file. |
06-26-2009, 08:20 PM | #10 |
Provocateur
Posts: 1,859
Karma: 505847
Join Date: Feb 2009
Location: Columbus, OH
Device: Kindle Touch, Kindle 2, Kindle DX, iPhone 3GS
|
Okay, it's still saying the original is corrupted. But FYI, when I start Calibre, get that error, and get the pop-up to respecify the path, when I respecify to path to the 0.6 library, Calibre exits out and the
database_path = 'C:\\Documents and Settings\\Owner/library1.db' is being re-written into the global.py. |
06-26-2009, 08:27 PM | #11 |
Provocateur
Posts: 1,859
Karma: 505847
Join Date: Feb 2009
Location: Columbus, OH
Device: Kindle Touch, Kindle 2, Kindle DX, iPhone 3GS
|
Well I guess that setting is ignored since it's looking at the metadata.db in the library directory.
As to why the processed file from sqlite3 is saying it's in use, I have no idea. |
06-26-2009, 08:28 PM | #12 |
Provocateur
Posts: 1,859
Karma: 505847
Join Date: Feb 2009
Location: Columbus, OH
Device: Kindle Touch, Kindle 2, Kindle DX, iPhone 3GS
|
At this point I'm all for giving up. I can give you the original corrupt metadata.db file if you think you can figure out what's wrong with it; otherwise I'm willing to start over from scratch with the new beta.
|
06-26-2009, 09:06 PM | #13 |
creator of calibre
Posts: 44,356
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
database_path is an obsolete setting, the important one is library_path. I'm a little too busy at the moment to look at your corrupted db
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Database Disk Image is malformed" when connecting to Calibre after adding new books | djorkboy | Kobo Reader | 13 | 10-07-2010 08:47 PM |
"Database Disk Image is malformed" when connecting to Calibre after adding new books | djorkboy | Calibre | 1 | 10-06-2010 08:59 PM |
DatabaseError: malformed database schema (author_insert_trg) - no such table: authors | peterdeegan | Calibre | 3 | 07-03-2010 12:44 AM |
Error: malformed database schema (books_insert_trg) | cbatalla | Calibre | 4 | 05-08-2010 01:02 PM |
DatabaseError: database disk image is malformed | moggie | Calibre | 2 | 12-13-2008 08:56 AM |