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 04-14-2012, 01:46 PM   #1
jer989
Enthusiast
jer989 doesn't litterjer989 doesn't litter
 
Posts: 37
Karma: 152
Join Date: Jul 2010
Location: NY
Device: Kindle 3, Kindle Fire HD
[Old Thread] Calibre database keeps getting corrupted on Win 7 - help!?!

Hi- I am running the latest version of calibre on a Dell netbook running Win7. I have now had a few instances of getting the database is corrupted message upon trying to open calibre and load my library. I am not too familiar with UAC and permissions on Win 7 but maybe that's the root of the problem.

My calibre libraries are at C:\Libraries\.... I did read in a forum somewhere that this could cause problems and that one should move their calibre libraries to the My Documents folder user account that they log into. However when I tried to do this, some of the ebook files in the calibre library folder itself could no be copied ("Can't read from the source file or disk.").. I don't believe that these files were corrupted in any way as they were recently all added into my calibre library without any issues. I ran scandisk and came up with nothing.

It's strange to me that I had this library open a day or so ago - used it. Shut down calibre - shut down my netbook and then the next time I go to open calibre (with that library that was previously working ok to be loaded) - I have the corrupt DB problem.

Thanks in advance for any advice or suggestions!

edit: The details from calibre regarding the corrupt DB were "OperationalError: disk I/O error"

Last edited by jer989; 04-14-2012 at 02:09 PM.
jer989 is offline   Reply With Quote
Old 04-14-2012, 02:25 PM   #2
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,143
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
This sounds more like a damaged hard drive than an issue related to calibre itself.

You might like to have Windows do a chkdsk (right click on the C drive go to properties / tools / error checking and probably select the bad block option.
PeterT is offline   Reply With Quote
Old 04-14-2012, 03:40 PM   #3
jer989
Enthusiast
jer989 doesn't litterjer989 doesn't litter
 
Posts: 37
Karma: 152
Join Date: Jul 2010
Location: NY
Device: Kindle 3, Kindle Fire HD
Thanks for the suggestion I'll try it now. I Just tryed to rebuild the DB and got the following error:

"Restoring Database Failed"

Details:

Traceback (most recent call last):
File "site-packages\calibre\library\restore.py", line 108, in run
File "site-packages\calibre\library\restore.py", line 245, in replace_db
WindowsError: [Error 32] The process cannot access the file because it is being used by another process
jer989 is offline   Reply With Quote
Old 04-14-2012, 05:52 PM   #4
jer989
Enthusiast
jer989 doesn't litterjer989 doesn't litter
 
Posts: 37
Karma: 152
Join Date: Jul 2010
Location: NY
Device: Kindle 3, Kindle Fire HD
update: as Win chkdsk is running (it's been going for a few hours now) - it's reporting now that it's recovering bad clusters by the dozens - and so far almost all of the look to be ebook files in my calibre library folders. I don't know how may files are affected yet - but it looks to be in the hundreds maybe (out of thousands of ebook files) - mind you it's not every single file - but a smattering of those library files.

So my question to anyone who might know - is it possible that the files got copied to my netbook's HDD and were corrupted in the process? (they were copied from a USB external HDD - and I did have some problems with that HDD getting things to copy over - mostly I thought due to filenames/paths that were too long - but maybe it was a bigger problem?)- I don't know - but I imagine that even if you had some sort of file copying error from the source to the destination that although the file might be corrupted and not usable - I'm guessing that chkdsk wouldn't bee that files' cluster as being 'bad', would it?!?

It seems like this smacks of a HHD hardware problem - but I don't want to jump to that conclusion if it's incorrect. Anyone have any words of wisdom for me?!

thanks!
jer989 is offline   Reply With Quote
Old 04-14-2012, 06:26 PM   #5
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Bad clusters on a disk are ALWAYS a hardware problem.

If you get one or two reported then this is probably OK as hard disks are expected to have a small number of errors and handle this in a recoverable way. However anything more than this indicates a disk that is likely to completely fail in the near future.
itimpi is offline   Reply With Quote
Old 04-14-2012, 07:00 PM   #6
theducks
Well trained by Cats
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: 29,762
Karma: 54401244
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
I agree with itimpi
RUN to the computer parts house and get a new drive and backup that problem drive NOW.

Whatever you do...
DO NOT defrag it.
DO NOT do any other drive intensive activity (like virus scans) or you run the possibility of losing the whole contents.


The only other thing that I have seen cause this, is a failing (hash on the rails) PSU.
theducks is online now   Reply With Quote
Old 04-14-2012, 08:35 PM   #7
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,143
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Quote:
Originally Posted by theducks View Post
I agree with itimpi
RUN to the computer parts house and get a new drive and backup that problem drive NOW.

Whatever you do...
DO NOT defrag it.
DO NOT do any other drive intensive activity (like virus scans) or you run the possibility of losing the whole contents.


The only other thing that I have seen cause this, is a failing (hash on the rails) PSU.
+1 million on this!
PeterT is offline   Reply With Quote
Old 04-15-2012, 01:37 PM   #8
jer989
Enthusiast
jer989 doesn't litterjer989 doesn't litter
 
Posts: 37
Karma: 152
Join Date: Jul 2010
Location: NY
Device: Kindle 3, Kindle Fire HD
Thanks all. I am in the process of getting everything off of and/or backed up off that computer. In the mean time maybe I'll try to use Spin-rite to see how bad off that HDD is and use it until it croaks. I'm thinking of just using calibre portable and slapping my library on a thumb drive - any advice on how I should migrate my library to a thumb drive to use with calibre? (I think I did try it in the past but I want to say I didn't have something about calibre set up eight because it wouldn't ever start up with the correct library loaded - that is to say, my main library that was on that thumb drive).
jer989 is offline   Reply With Quote
Old 04-15-2012, 02:11 PM   #9
theducks
Well trained by Cats
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: 29,762
Karma: 54401244
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Calibre Portable only works with a single library.
theducks is online now   Reply With Quote
Old 04-15-2012, 04:00 PM   #10
jer989
Enthusiast
jer989 doesn't litterjer989 doesn't litter
 
Posts: 37
Karma: 152
Join Date: Jul 2010
Location: NY
Device: Kindle 3, Kindle Fire HD
what do you mean only works with a single library exactly. I installed the calibre portable app on my thumb drive, then did a switch/create to an already existing library on that same thumb drive. I had originally installed calibre portable, and copied my previously existing library folder to the "Calibre Library" folder that was created on my thumb drive, but then during the welcome wizard it complained that the "CAlibre Library" folder wasn't empty so I moved that library folder up one level, then went through the rest of the install and then like I said above, switched to that library folder that is up one level from the Calibre library folder. Was that the wrong way to do it?
jer989 is offline   Reply With Quote
Old 04-15-2012, 10:11 PM   #11
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: 43,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre portable can work with more than one library folder, but it is designed to be used with only one. That is why, unlike normal calibre, it will always start with the same library, not the one you were last using when you quit calibre. Also, since the absolute paths of libraries change when the drive letter of portable disks change, the quick switch and copy to library features become much harder to use.
kovidgoyal is offline   Reply With Quote
Old 04-16-2012, 05:18 PM   #12
jer989
Enthusiast
jer989 doesn't litterjer989 doesn't litter
 
Posts: 37
Karma: 152
Join Date: Jul 2010
Location: NY
Device: Kindle 3, Kindle Fire HD
Thanks for clearing that up - I think I have everything working now. And thanks Kovid for all of your work on calibre!
jer989 is offline   Reply With Quote
Old 11-10-2012, 05:47 PM   #13
Dellu
Member
Dellu began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jul 2011
Device: Nook Simple Touch
The same here

I am getting exactly the same problem. My data is stored in an external hard drive. The Calibre on my windows machine reads it perfectly. But, the one on my mac keeps on saying the database is corrupted. What is going on?

calibre, version 0.9.5
Corrupted database: The library database at /Volumes/Dik/Documents/EPacks/[EPUB] Library (Final)/Books appears to be corrupted. Do you want calibre to try and rebuild it automatically? The rebuild may not be completely successful.

Traceback (most recent call last):
File "site-packages/calibre/gui2/ui.py", line 534, in library_moved
File "site-packages/calibre/library/database2.py", line 230, in __init__
File "site-packages/calibre/library/database2.py", line 359, in initialize_dynamic
File "site-packages/calibre/library/sqlite.py", line 314, in run
DatabaseException: attempt to write a readonly database
RemoteTraceback (most recent call last):
File "site-packages/calibre/library/sqlite.py", line 271, in run
OperationalError: attempt to write a readonly database
Dellu is offline   Reply With Quote
Old 11-10-2012, 05:59 PM   #14
theducks
Well trained by Cats
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: 29,762
Karma: 54401244
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Dellu View Post
I am getting exactly the same problem. My data is stored in an external hard drive. The Calibre on my windows machine reads it perfectly. But, the one on my mac keeps on saying the database is corrupted. What is going on?

calibre, version 0.9.5
Corrupted database: The library database at /Volumes/Dik/Documents/EPacks/[EPUB] Library (Final)/Books appears to be corrupted. Do you want calibre to try and rebuild it automatically? The rebuild may not be completely successful.

Traceback (most recent call last):
File "site-packages/calibre/gui2/ui.py", line 534, in library_moved
File "site-packages/calibre/library/database2.py", line 230, in __init__
File "site-packages/calibre/library/database2.py", line 359, in initialize_dynamic
File "site-packages/calibre/library/sqlite.py", line 314, in run
DatabaseException: attempt to write a readonly database
RemoteTraceback (most recent call last):
File "site-packages/calibre/library/sqlite.py", line 271, in run
OperationalError: attempt to write a readonly database
Read the last line

you are mounted read only or windows has the folder locked(in use)
Calibre is a SINGLE connection DB at this time.
BTW Bouncing between OS (file system differences) is not a wonderfully great idea.
If you need to run Calibre, consider using Remote desktop connection or VNC to remote control your windows 'host'
theducks is online now   Reply With Quote
Old 01-01-2013, 11:26 AM   #15
DaveJJ
Junior Member
DaveJJ began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Oct 2012
Device: Kindle 3.3
Hi,

@theducks
I have recently run into the corrupted databases problem as I have switched from Windows to Linux (Ubuntu 12.10) although my wife still runs Win7. We both access the same libraries held on a NAS and saw this thread relating to a similar (same) problem.

I did try rebuilding one of the database but I then get a problem if my wife accesses the library from her Win7 machine (usually missing or extra books and the old databases reported as authors).

The option to run remote desktop or VNC for remote control is not really an option as the Win7 machine may not be running at the time I want to access the library. Is there an alternative? All my other files and databases on the NAS are unaffected by accessing from the two machines. It seems to be a problem only when I run Calibre.

I'm using Ubuntu 12.10 64bit and the libraries are stored on a Buffalo Link Station Pro.

Thanks
DaveJJ is offline   Reply With Quote
Reply

Tags
calibre, corrupt, corrupted, database

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Corrupted database Qylie Calibre 8 08-28-2014 02:02 AM
[Old Thread] Corrupted library database smarties86 Calibre 2 09-02-2012 06:30 AM
Corrupted database garyft Calibre 3 05-13-2011 02:10 PM
Calibre Mac & Windows (Corrupted Database) ciscoswitch Calibre 4 09-08-2010 01:29 PM
Calibre keeps saying database of books is corrupted. Media.xml file seajewel Calibre 8 02-26-2010 09:35 PM


All times are GMT -4. The time now is 02:59 PM.


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