Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-20-2010, 03:38 AM   #1
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
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'
Sweetpea is offline   Reply With Quote
Old 10-20-2010, 06:02 AM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,703
Karma: 6658935
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.
Attached Files
File Type: zip restore.zip (2.5 KB, 229 views)
chaley is offline   Reply With Quote
Old 10-20-2010, 06:58 AM   #3
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
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...)
Sweetpea is offline   Reply With Quote
Old 10-20-2010, 07:27 AM   #4
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Sweetpea View Post
Yep, it works.
Thanks.
Quote:
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! )
I agree, both on the testing and your predilection to do strange things. Unfortunately, the 100% goal is almost impossible to reach on complex systems, because the number of test cases is almost infinite.

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.
chaley is offline   Reply With Quote
Old 10-20-2010, 07:38 AM   #5
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by chaley View Post
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.
But then again, the users helping in the development, and be it only via testing, is, in my eyes, one of the points of open source software.
Manichean is offline   Reply With Quote
Old 10-20-2010, 09:25 AM   #6
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Sweetpea View Post
Yep, it works.
Out of curiosity, was the database completely recovered, as far as you have seen?
chaley is offline   Reply With Quote
Old 10-20-2010, 09:37 AM   #7
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Manichean View Post
But then again, the users helping in the development, and be it only via testing, is, in my eyes, one of the points of open source software.
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.
chaley is offline   Reply With Quote
Old 10-20-2010, 10:31 AM   #8
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
Quote:
Originally Posted by chaley View Post
Out of curiosity, was the database completely recovered, as far as you have seen?
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 )
Sweetpea is offline   Reply With Quote
Old 10-20-2010, 02:14 PM   #9
phenomshel
ZCD BombShel
phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.
 
phenomshel's Avatar
 
Posts: 4,793
Karma: 8293322
Join Date: Jan 2009
Location: The Frozen North (aka Illinois, USA)
Device: iPad, STB Kindle Oasis
Quote:
Originally Posted by chaley View Post
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.
Glad you enjoy it, because I don't see it stopping anytime soon....or ever. I sometimes feel guilty about asking "how do I do this?" or "this person got this result, but I get that result, why?" and similar things, not to mention my well known penchant for loving my eye candy in my software - which I'm aware that a lot of developers, especially Linux developers - hate. (I know this because I had a run-in with KMail devs...don't ask, it wasn't pretty....*grin*).
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!
phenomshel is offline   Reply With Quote
Old 10-20-2010, 03:58 PM   #10
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by phenomshel View Post
Glad you enjoy it ...
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...
chaley is offline   Reply With Quote
Old 10-20-2010, 04:16 PM   #11
phenomshel
ZCD BombShel
phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.
 
phenomshel's Avatar
 
Posts: 4,793
Karma: 8293322
Join Date: Jan 2009
Location: The Frozen North (aka Illinois, USA)
Device: iPad, STB Kindle Oasis
Quote:
Originally Posted by chaley View Post
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...
Cool. I love your cat avatars, Charles. Someday I'll tell you about my cats...past and present.
phenomshel is offline   Reply With Quote
Old 10-20-2010, 04:45 PM   #12
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by chaley View Post
[...]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.[...]
Yeah, I'm frequently amused by what people try to do. Amused and impressed, often both at once.
Manichean is offline   Reply With Quote
Old 10-21-2010, 01:58 AM   #13
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
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
Sweetpea is offline   Reply With Quote
Old 10-21-2010, 04:00 AM   #14
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Sweetpea View Post
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
Yes, it is, but you must keep in mind that restoring an older db can break db/file system synchronization. If a title or an author was changed between the backup and the restore, then the file system will reflect the new data but the db will reflect the old. Calibre will be unable to find the formats or covers for books in this state.

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'.
chaley is offline   Reply With Quote
Old 10-21-2010, 06:50 AM   #15
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
Quote:
Originally Posted by chaley View Post
Yes, it is, but you must keep in mind that restoring an older db can break db/file system synchronization. If a title or an author was changed between the backup and the restore, then the file system will reflect the new data but the db will reflect the old. Calibre will be unable to find the formats or covers for books in this state.

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'.
Oh, I didn't mean the .db file only... I meant the entire Calibre DB. I already had a backup, but that one was so old (2 weeks, at least!) that it was horribly outdated...
Sweetpea is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 03:20 PM.


MobileRead.com is a privately owned, operated and funded community.