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 12-06-2012, 05:28 AM   #1
bhoyt
Enthusiast
bhoyt began at the beginning.
 
bhoyt's Avatar
 
Posts: 38
Karma: 10
Join Date: Jun 2011
Location: Oamaru, New Zealand
Device: KT, Android Tablet and Phone
Restore Database fails - Exception: Something bad happened

I noticed some titles were not showing in my library listing. I ran "Check Library" and it returned "Success". But when I try "Restore Database" to restore the missing titles, I get the following error:

calibre, version 0.9.8
ERROR: Failed: Restoring database failed, click Show details to see details

Traceback (most recent call last):
File "site-packages\calibre\library\restore.py", line 115, in run
Exception: Something bad happened

Even after re-installing I still get the same error.

Anyone had this problem? Any fixes?

Bruce
bhoyt is offline   Reply With Quote
Old 12-06-2012, 09:47 AM   #2
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,121
Karma: 5468860
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by bhoyt View Post
I noticed some titles were not showing in my library listing. I ran "Check Library" and it returned "Success". But when I try "Restore Database" to restore the missing titles, I get the following error:

calibre, version 0.9.8
ERROR: Failed: Restoring database failed, click Show details to see details

Traceback (most recent call last):
File "site-packages\calibre\library\restore.py", line 115, in run
Exception: Something bad happened

Even after re-installing I still get the same error.

Anyone had this problem? Any fixes?

Bruce
OK, your Library showed corruption and you ran The Check Library. Did you run BOTH sections? The first checks the database for (data) structural errors (It could be garbage, but it is Valid Garbage ). The second part matches the data to the Library files.

Did you check your system First? (Checkdisk, Malware scans...)


That generic message implies (to me), that there is some serious (and non-specific) folder corruption.


You might try running in Debug mode to try the rebuild, to get an idea where the choke point is.

But first. Validate your HD and computer
Good luck
theducks is offline   Reply With Quote
 
Enthusiast
Old 12-06-2012, 12:29 PM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 25,282
Karma: 4961457
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That error message basically means that the restore failed to find a single restorable book. Running in debug mode might give you some more info.
kovidgoyal is offline   Reply With Quote
Old 12-06-2012, 03:39 PM   #4
bhoyt
Enthusiast
bhoyt began at the beginning.
 
bhoyt's Avatar
 
Posts: 38
Karma: 10
Join Date: Jun 2011
Location: Oamaru, New Zealand
Device: KT, Android Tablet and Phone
theducks: I did run both sections of Library Check and both gave success. At your advice I ran CHKDSK on both my hard drives and everything checks OK. I am running MSE and don't know of any malware on my system. I have now run Calibre with debug on and still get the error. Here is the output and the log file.

calibre, version 0.9.8
Debug mode: <p>You have started calibre in debug mode. After you quit calibre, the debug log will be available in the file: c:\docume~1\bruce\locals~1\temp\tmpmgqg5q.txt<p>Th e log will be displayed automatically.

calibre, version 0.9.8
ERROR: Failed: Restoring database failed, click Show details to see details

Traceback (most recent call last):
File "site-packages\calibre\library\restore.py", line 115, in run
Exception: Something bad happened

calibre Debug log
calibre 0.9.8 isfrozen: True
Windows-XP-5.1.2600-SP3 Windows
('Windows', 'XP', '5.1.2600')
Python 2.7.3
Windows: ('XP', '5.1.2600', 'SP3', 'Multiprocessor Free')
Starting up...
Started up in 27.31 seconds with 399 books

Bruce
bhoyt is offline   Reply With Quote
Old 12-06-2012, 03:42 PM   #5
bhoyt
Enthusiast
bhoyt began at the beginning.
 
bhoyt's Avatar
 
Posts: 38
Karma: 10
Join Date: Jun 2011
Location: Oamaru, New Zealand
Device: KT, Android Tablet and Phone
kovidgoyal: as noted in #4 I have run in debug mode and your comment "That error message basically means that the restore failed to find a single restorable book." seems to describe what has happened. But I am no further along in finding the problem.

Bruce
bhoyt is offline   Reply With Quote
Old 12-06-2012, 08:49 PM   #6
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,121
Karma: 5468860
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by bhoyt View Post
kovidgoyal: as noted in #4 I have run in debug mode and your comment "That error message basically means that the restore failed to find a single restorable book." seems to describe what has happened. But I am no further along in finding the problem.

Bruce
If you Peek into the Library folder (this is one of those time YOU Should be there):
can you see Author folders?

If you spot check a few:
do you see a:
title (###) folder
and in that:
cover.jpg
metadata.opf , <-- this is what calibre will use to reconstruct
title.(format) <-- (does not exist for a 'empty' book
theducks is offline   Reply With Quote
Old 12-06-2012, 10:01 PM   #7
bhoyt
Enthusiast
bhoyt began at the beginning.
 
bhoyt's Avatar
 
Posts: 38
Karma: 10
Join Date: Jun 2011
Location: Oamaru, New Zealand
Device: KT, Android Tablet and Phone
Quote:
Originally Posted by theducks View Post
If you Peek into the Library folder (this is one of those time YOU Should be there):
can you see Author folders?

Yes all author folders are there.

If you spot check a few:
do you see a:
title (###) folder
and in that:
cover.jpg
metadata.opf , <-- this is what calibre will use to reconstruct
title.(format) <-- (does not exist for a 'empty' book
Yes, all have .opf and title.format files.
But 11 have no cover.jpg file.
However that has never caused a problem in the past.

So I'm still no further along.
bhoyt is offline   Reply With Quote
Old 12-06-2012, 10:10 PM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 25,282
Karma: 4961457
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The only way I know of for what you describe to happen is if the book id in the opf files dont match book id in the directory names. I have no idea how that happened unless you changed the directory names outside calibre.

The only thing you can do at that point is create a new library and add the books to it from the old library folder using add books from subdirectory, one book per folder.
kovidgoyal is offline   Reply With Quote
Old 12-06-2012, 10:14 PM   #9
bhoyt
Enthusiast
bhoyt began at the beginning.
 
bhoyt's Avatar
 
Posts: 38
Karma: 10
Join Date: Jun 2011
Location: Oamaru, New Zealand
Device: KT, Android Tablet and Phone
Quote:
Originally Posted by kovidgoyal View Post
The only way I know of for what you describe to happen is if the book id in the opf files dont match book id in the directory names. I have no idea how that happened unless you changed the directory names outside calibre.

The only thing you can do at that point is create a new library and add the books to it from the old library folder using add books from subdirectory, one book per folder.
Why doesn't check library show that (i.e. the book id in the opf files dont match book id in the directory names) up?

Last edited by bhoyt; 12-06-2012 at 10:30 PM.
bhoyt is offline   Reply With Quote
Old 12-06-2012, 10:50 PM   #10
bhoyt
Enthusiast
bhoyt began at the beginning.
 
bhoyt's Avatar
 
Posts: 38
Karma: 10
Join Date: Jun 2011
Location: Oamaru, New Zealand
Device: KT, Android Tablet and Phone
Quote:
Originally Posted by kovidgoyal View Post
The only thing you can do at that point is create a new library and add the books to it from the old library folder using add books from subdirectory, one book per folder.
OK I've done that and all is OK. I must have changed an ID at some point.

Thanks, Kovid.
Bruce
bhoyt is offline   Reply With Quote
Old 12-07-2012, 09:27 AM   #11
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,121
Karma: 5468860
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Another (bad) possibility was you restored a metadata .db from another library (A Mis-Match), but then, I would expect phase 2 of the Library check to hemorrhage all over your screen.
theducks 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
Restore Database? BeeTee-Ess Calibre 2 10-12-2012 07:40 AM
Database Exception Error Calibre markyfr Calibre 0 04-16-2012 07:39 AM
restore database help mabee Calibre 13 01-11-2011 02:16 PM
Intermittent Database Exception jt421 Calibre 7 12-22-2009 04:41 AM
Database Exception uuid4 error hnoto Calibre 5 11-22-2009 12:46 AM


All times are GMT -4. The time now is 04:30 AM.


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