10-20-2010, 03:38 AM | #1 |
Grand Sorcerer
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
|
Restore DB
Yikes...
That's what you get when messing around with your external HD: I permanently deleted my .db file... No worries, or so I thought, there is this nice feature: calibredb restore_database Which doesn't work... Restoring database failed with error: Traceback (most recent call last): File "site-packages\calibre\library\restore.py", line 93, in run File "site-packages\calibre\library\restore.py", line 173, in create_cc_metadata TypeError: unhashable type: 'list' |
10-20-2010, 06:02 AM | #2 |
Grand Sorcerer
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Well, you do have a talent for pushing corner cases.
The problem is that the OPFs in your hierarchy have conflicting definitions for some custom columns. The code that detects that situation is broken. It is hard to test it, unfortunately. Attached is a new version of the restore code. I hope it fixes the problem. Unzip it and put the resulting file restore.py into your calibre installation directory in the folder src/calibre/library. Please a) let me know if it fixes the problem, and b) remember to remove it the next time you upgrade. |
Advert | |
|
10-20-2010, 06:58 AM | #3 |
Grand Sorcerer
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
|
Yep, it works.
and they taught me to test all border-line cases when I went to school (I should have become a tester instead of a software developer! ) And I was trying to clear up some custom columns, and some custom columns had template errors due to that (mostly my test columns...) |
10-20-2010, 07:27 AM | #4 | |
Grand Sorcerer
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Thanks.
Quote:
The other problem is that we don't have a regression test platform for calibre. All of the template problems you have found actually did work at one point. The errors were introduced later, in these cases when fixing bugs or adding features in related areas. With the resources we have, it is more efficient to recruit users to help with the testing then to spend weeks trying (and failing) to do it ourselves. |
|
10-20-2010, 07:38 AM | #5 | |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
Quote:
|
|
Advert | |
|
10-20-2010, 09:25 AM | #6 |
Grand Sorcerer
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
10-20-2010, 09:37 AM | #7 |
Grand Sorcerer
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
The active, involved community is one reason I enjoy working on calibre. The interesting ideas and (for me more important) the challenges the ideas create help keep the my brain from ossifying. As for testing, this user community comes up with extremely unexpected ways of using this program, and that too contributes to the challenge and fun. In the end, everyone wins. Can't beat that, really.
|
10-20-2010, 10:31 AM | #8 |
Grand Sorcerer
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
|
All, but the last update I did to my #file_name custom field. (I did something brilliant with my #version field which I can't repeat...) And I did have some template errors, but that was mostly because I now saw those fields (after my renaming spree in my custom columns )
|
10-20-2010, 02:14 PM | #9 | |
ZCD BombShel
Posts: 4,793
Karma: 8293322
Join Date: Jan 2009
Location: The Frozen North (aka Illinois, USA)
Device: iPad, STB Kindle Oasis
|
Quote:
I don't think you ever have to worry about your brain ossifying Charles. I read your CV online (in your sig.). You probably have brain power to spare for half the forum! |
|
10-20-2010, 03:58 PM | #10 |
Grand Sorcerer
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
How kind.
OFF TOPIC ALERT Next cats will be our first ones. Our very first was the only male in a friend's queen's unexpected litter of 5 (they delayed spaying her a bit too long). He was a wonderful cat, smart and affectionate, and lived to 20. The second was a rescue cat, found when 3 weeks old (according to the vet). She was so young that she didn't know how to care for herself. She knew what the box was for, but didn't know to keep her paws out of the mess. Fortunately we had our first, and he dealt with the problem. It was very amusing to see him teach her how to bathe. We were instructed to feed her baby food for some weeks. Weaning her away from it was not fun... |
10-20-2010, 04:16 PM | #11 | |
ZCD BombShel
Posts: 4,793
Karma: 8293322
Join Date: Jan 2009
Location: The Frozen North (aka Illinois, USA)
Device: iPad, STB Kindle Oasis
|
Quote:
|
|
10-20-2010, 04:45 PM | #12 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
|
10-21-2010, 01:58 AM | #13 |
Grand Sorcerer
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
|
To go a bit more on-topic:
I made a backup of my Calibre database yesterday and promised myself to do so more often (especially after playing with it!) It's still the best way of rolling back things |
10-21-2010, 04:00 AM | #14 | |
Grand Sorcerer
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
You can use check library to find these problems. In most cases (all that I can think of), you can recover by renaming the 'extra authors/titles' to what calibre wants them to be, which will be shown in 'missing authors/titles'. |
|
10-21-2010, 06:50 AM | #15 | |
Grand Sorcerer
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
|
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Old Thread] Calibre Backup and Restore | Timber | Calibre | 21 | 06-01-2011 07:31 PM |
PRS-600 Backup and Restore of Notes | raymondchen625 | Sony Reader | 1 | 12-20-2009 11:49 PM |
any one has kindle dx restore firmware?? | chinaet | Kindle Developer's Corner | 0 | 07-25-2009 05:14 AM |
iLiad Backup / Restore ? | ce3po | iRex Developer's Corner | 3 | 11-18-2007 05:53 PM |