|
|
Thread Tools | Search this Thread |
01-14-2012, 12:50 PM | #1 |
Chasing Butterflies
Posts: 3,132
Karma: 5074169
Join Date: Mar 2011
Location: American Southwest
Device: Uses batteries.
|
Calibre metadata.db contains errors... Calibre2opds cannot open file.
I'm having a spot of trouble.
I noticed a few days ago that Calibre2opds isn't able to run anymore. While testing through with the developer, it came out that he's not able to open my metadata.db file on his end. Husband and I are programmers, and he has SQLiteExpert on his computer, so he snagged a copy of my metadata.db file and tried to open it. The following errors were thrown: Code:
2.6 Message : The following errors were encountered while refreshing schema: Error refreshing schema for view "meta":_no such function:_sortconcat Error refreshing schema for view "tag_browser_filtered_authors":_no such function:_books_list_filter Error refreshing schema for view "tag_browser_filtered_custom_column_2":_no such function:_books_list_filter Error refreshing schema for view "tag_browser_filtered_custom_column_3":_no such function:_books_list_filter Error refreshing schema for view "tag_browser_filtered_publishers":_no such function:_books_list_filter Error refreshing schema for view "tag_browser_filtered_ratings":_no such function:_books_list_filter Error refreshing schema for view "tag_browser_filtered_series":_no such function:_books_list_filter Error refreshing schema for view "tag_browser_filtered_tags":_no such function:_books_list_filter Error refreshing schema for view "tag_browser_series":_no such function:_title_sort. |
01-14-2012, 01:23 PM | #2 |
Wizard
Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
There is a Library->Library Maintenance->Restore Database option that will rebuild a damaged Calibre database from the underlying files in the library.
|
Advert | |
|
01-14-2012, 01:23 PM | #3 |
Well trained by Cats
Posts: 30,569
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
did you run the Library Maintenance tool in Calibre (Library Icon arrow)?
|
01-14-2012, 02:20 PM | #4 | |
Grand Sorcerer
Posts: 12,150
Karma: 7908995
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
The errors do not mean that the DB is corrupted. Can calibre open the DB (the library)? If so, then there is strong reason to believe that the DB is OK and the problem is somewhere else. |
|
01-14-2012, 04:12 PM | #5 | |
Chasing Butterflies
Posts: 3,132
Karma: 5074169
Join Date: Mar 2011
Location: American Southwest
Device: Uses batteries.
|
Quote:
(Additionally, WOW, that is a nuke option. Erased all my custom columns, so thank goodness I backed everything up first.) Running a check database in Calibre now, but not hopeful. --- As for the "oh, if Calibre works, the error must be elsewhere" post, if the database file can't be opened by Calibre2opds or SQLite, then there's a problem because that's relatively new. |
|
Advert | |
|
01-14-2012, 04:32 PM | #6 | ||
Grand Sorcerer
Posts: 12,150
Karma: 7908995
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Quote:
Are you sure that SQLiteExpress does not try to open/load the views? If it does, then it will fail, because the functions are not available. SQLiteSpy (at least V1.8.12) does not open the views when it opens the DB. |
||
01-14-2012, 04:47 PM | #7 | |
Chasing Butterflies
Posts: 3,132
Karma: 5074169
Join Date: Mar 2011
Location: American Southwest
Device: Uses batteries.
|
Quote:
Husband says that yes, SQLiteExpert is trying to open/load the views. So... mystery solved, I guess. But the problem remains that Calibre2opds cannot open my metadata.db file and if neither the tool nor the developer can open it *and* it was working in December and I've changed nothing except update Calibre, then it seems like something is wrong. Restore database retained my custom columns, but lost all the tagging data associated with them. So custom column "Source" was still there, but the actual data that X book was Source --> Amazon was gone. You say this means that the opf files are corrupt. Yay? I have 1,000+ in my Calibre library. I hope there's a way to solve/fix this without having to re-input every single one. Because that would make me very sad indeed. Last edited by anamardoll; 01-14-2012 at 04:55 PM. |
|
01-14-2012, 05:01 PM | #8 |
Chasing Butterflies
Posts: 3,132
Karma: 5074169
Join Date: Mar 2011
Location: American Southwest
Device: Uses batteries.
|
Added: I believe the Calibre2opds developer is using SQLiteSpy and he wasn't able to open my metadata.db file either.
|
01-14-2012, 10:49 PM | #9 |
creator of calibre
Posts: 44,750
Karma: 24967300
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You need to provide an actual error message that occurs when you try to open the database. The one you provided is meaningless as it is caused by trying to use functions that are not available.
If you want to test the validity of the sqlite database use the official sqlite3 command line client from sqlite.org sqlite3 metadata.db .dump > dump.sql You will see that the sqlite database is converted into SQL statements with no issues. calibre itself uses the official sqlite3 libraries. |
01-15-2012, 03:26 AM | #10 | ||
Grand Sorcerer
Posts: 12,150
Karma: 7908995
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
If you upgraded calibre from a version older than 0.8.9, then calibre's DB will also have been upgraded. It might be necessary to upgrade calibre2opds. Quote:
[EDIT] The restore code is correct after all. It obtains the list of permitted values from the latest OPF, so changes to the list are accounted for. You can ensure that the column definitions and OPF contents are correct by using Library -> Library Maintenance -> Start backing up metadata ... This will rewrite all the OPFs. It can take a while, as calibre writes a book a second (or thereabouts). Another point that follows on Kovid's suggestion: calibre's "Check Library" function dumps the database to SQL, recreates it, then restores it from the dumped SQL. This process will eliminate any structural corruption (unless the official SQLite is broken) and will also eliminate any data integrity corruption. Restore your backup, start calibre, and run check library. If that completes successfully, and if calibre can be stopped and restarted, then the probability of DB structural or data corruption approaches zero. Try calibre2opds. If it still cannot open the database, then one should look carefully at calibre2opds for the problem. Last edited by chaley; 01-15-2012 at 03:48 AM. Reason: note about restore code |
||
01-15-2012, 04:58 AM | #11 | |
US Navy, Retired
Posts: 9,878
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
I'm curious, when you open calibre does it work? |
|
01-15-2012, 07:01 AM | #12 |
Wizard
Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Just for the record - I do not know of any issues with Calibre2Opds working with the calibre database at any version level.
|
01-15-2012, 08:35 AM | #13 |
US Navy, Retired
Posts: 9,878
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
|
01-15-2012, 10:48 AM | #14 |
Chasing Butterflies
Posts: 3,132
Karma: 5074169
Join Date: Mar 2011
Location: American Southwest
Device: Uses batteries.
|
I guess I'm not explaining myself very clearly, sorry: yes, Calibre works.* But Calibre2opds doesn't, it can't open the metadata.db file, I've been dealing with the Calibre2opds developer (thank you, by the way!) for over a week, and since he can't open my metadata file with his SQ tools, he can't diagnose the problem further.
And the only thing I've changed in the 8+ months of running Calibre2opds weekly is that I upgraded Calibre. So I've got a system that worked great and now doesn't, and I'm looking at the single point of change that I'm aware of as the possible introduction of the error. (* Although for about the same amount of time I've had "error sending metadata to device" errors when using Calibre with my two Sony readers. I thought that was an unrelated problem, but it may not be.) --- I did run a check library yesterday and it said everything was kosher except it didn't like the Calibre2opds catalog folders in the Calibre library directory. But they've always been there before with no problem. I'll run the "Library -> Library Maintenance -> Start backing up metadata ..." now, thank you, since we're about to go get groceries and you say it takes awhile. I'll run "sqlite3 metadata.db .dump > dump.sql" when we get back, thank you. Last edited by anamardoll; 01-15-2012 at 10:54 AM. |
01-15-2012, 11:59 AM | #15 | |||
Grand Sorcerer
Posts: 12,150
Karma: 7908995
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Do note that with your database I will be able to see the metadata of the books in your library. If you consider that a privacy violation (which I can understand), don't send it to me. Quote:
Quote:
|
|||
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Metadata and Calibre2Opds | evanbernstein | Library Management | 4 | 01-09-2012 10:23 AM |
Delete 1 books format of open file gives DB errors ? | pchrist7 | Library Management | 3 | 12-09-2011 01:03 PM |
Where is the .exe file in the zip Calibre2opds file? | chilady1 | Related Tools | 4 | 09-17-2011 12:56 PM |
So I have this PDB file... Calibre can't open or convert it. | HelenaJole | Calibre | 4 | 01-01-2011 09:20 PM |
calibre2opds won't open | jhempel24 | Calibre | 5 | 11-06-2010 05:58 AM |