Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 05-16-2026, 02:55 AM   #1
maddz
Wizard
maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.
 
Posts: 1,518
Karma: 30408862
Join Date: Mar 2010
Location: UK
Device: Kobo Forma, Icarus, iPad Mini 2, Kobo Touch, Google Nexus 7
Corrupt database

Well, successfully copied my library across from the other machine.

Issues:

1. Double-clicking a book tries re-adding it to the library instead of opening the viewer
2. The database is corrupt and I get the following error message when I try to restore it:

Spoiler:
calibre, version 7.26.0
ERROR: Unhandled exception: <b>AttributeError</b>:'NoneType' object has no attribute 'prefs'

calibre 7.26 embedded-python: True
macOS-15.7.3-arm64-arm-64bit Darwin ('64bit', '')
('Darwin', '24.6.0', 'Darwin Kernel Version 24.6.0: Wed Nov 5 21:34:00 PST 2025; root:xnu-11417.140.69.705.2~1/RELEASE_ARM64_T8132')
Python 3.11.5
OSX: ('15.7.3', ('', '', ''), 'arm64')
Interface language: None
EXE path: /Applications/calibre 2.app/Contents/MacOS/calibre
Successfully initialized third party plugins: DeACSM (0, 0, 16) && LCPL Input (0, 0, 5) && Gather KFX-ZIP (from KFX Input) (2, 31, 0) && DeDRM (10, 0, 2) && Package KFX (from KFX Input) (2, 31, 0) && Amazon.com Multiple Countries (1, 0, 0) && Baen (1, 2, 0) && Comicvine (0, 14, 2) && Count Pages (1, 15, 2) && Current Paths (3, 0, 0) && EpubMerge (3, 2, 0) && EpubSplit (3, 12, 0) && Extract ISBN (1, 6, 6) && Find Duplicates (1, 10, 10) && Job Spy (1, 0, 239) && KFX metadata reader (from KFX Input) (2, 31, 0) && From KFX (2, 31, 0) && KFX Input (2, 31, 0) && Set KFX metadata (from KFX Output) (2, 19, 0) && KFX Output (2, 19, 0) && KePub Metadata Reader (3, 4, 3) && KePub Output (3, 7, 3) && Kindle Collections (1, 7, 29) && Kindle hi-res covers (0, 5, 1) && KindleUnpack - The Plugin (0, 83, 8) && Kobo Metadata (1, 12, 1) && Kobo Utilities (2, 28, 0) && KoboTouchExtended (3, 7, 3) && LibraryThing Match (0, 2, 5) && Obok DeDRM (10, 0, 0) && Quality Check (1, 14, 7) && Reading List (1, 15, 7) && View Manager (1, 10, 5)
Traceback (most recent call last):
File "calibre/gui2/actions/choose_library.py", line 668, in restore_database
AttributeError: 'NoneType' object has no attribute 'prefs'


Running calibre 7.26 on a Mac Mini M4 MacOS Sequoia 15.7.3 (24G419)

(Yeah, I know, ancient version, but I want to complete my cross-reference with LibraryThing before upgrading.)
maddz is offline   Reply With Quote
Old 05-16-2026, 03:33 AM   #2
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: 46,246
Karma: 29630732
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can always restore from command line by running

calibredb restore_database -r
kovidgoyal is offline   Reply With Quote
Advert
Old 05-16-2026, 04:29 AM   #3
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 22,673
Karma: 33011292
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by maddz View Post
Issues:

1. Double-clicking a book tries re-adding it to the library instead of opening the viewer
Do you mean something like this:

Click image for larger version

Name:	Screenshot 2026-05-16 180123.jpg
Views:	111
Size:	244.9 KB
ID:	223352

If so, change the file open association in Finder to the calibre viewer rather than the calibre library manager

On Windows that would be: ebook-viewer.exe, rather than calibre.exe.

BR
BetterRed is offline   Reply With Quote
Old 05-16-2026, 10:45 AM   #4
maddz
Wizard
maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.
 
Posts: 1,518
Karma: 30408862
Join Date: Mar 2010
Location: UK
Device: Kobo Forma, Icarus, iPad Mini 2, Kobo Touch, Google Nexus 7
Quote:
Originally Posted by BetterRed View Post
Do you mean something like this:

Attachment 223352

If so, change the file open association in Finder to the calibre viewer rather than the calibre library manager

On Windows that would be: ebook-viewer.exe, rather than calibre.exe.

BR
No, it's within calibre. Double-clicking the book record tries to add the book to calibre not open the book in the viewer. I wonder if there's a setting issue...
maddz is offline   Reply With Quote
Old 05-16-2026, 10:46 AM   #5
maddz
Wizard
maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.
 
Posts: 1,518
Karma: 30408862
Join Date: Mar 2010
Location: UK
Device: Kobo Forma, Icarus, iPad Mini 2, Kobo Touch, Google Nexus 7
Quote:
Originally Posted by kovidgoyal View Post
You can always restore from command line by running

calibredb restore_database -r
I did say I was running a Mac...
maddz is offline   Reply With Quote
Advert
Old 05-16-2026, 02:54 PM   #6
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 83,400
Karma: 153646249
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Time to rebuild the database.
JSWolf is offline   Reply With Quote
Old 05-16-2026, 05:56 PM   #7
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 22,673
Karma: 33011292
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by maddz View Post
I did say I was running a Mac...
Run the command from MacOS Terminal

https://support.apple.com/en-gb/guid...al/welcome/mac

BR
BetterRed is offline   Reply With Quote
Old 05-16-2026, 06:19 PM   #8
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 22,673
Karma: 33011292
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by maddz View Post
No, it's within calibre. Double-clicking the book record tries to add the book to calibre not open the book in the viewer. I wonder if there's a setting issue...
1. Where are you doing the double-click - in calibre, in Finder or something else ?

2. What sort of file EPUB, MOBI, CSV…?

3. Is that file type checked in Preferences->Behaviour->Use internal viewer for:?

4. What's in Preferences->Tweaks->Control behavior of the book list? Post a screen shot.

BR
BetterRed is offline   Reply With Quote
Old 05-17-2026, 11:21 AM   #9
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: 46,246
Karma: 29630732
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by maddz View Post
I did say I was running a Mac...
Yes, it works on a mac as well
kovidgoyal is offline   Reply With Quote
Old 05-17-2026, 02:04 PM   #10
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: 31,771
Karma: 64144480
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
The question you want to think about is WHY it went bad.

Did you sync to another instance? Have your Library on a NAS or Shared drive?
If you don't fix the cause, it will happen again AND you will loose data or books.
theducks is offline   Reply With Quote
Old 05-17-2026, 04:04 PM   #11
maddz
Wizard
maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.
 
Posts: 1,518
Karma: 30408862
Join Date: Mar 2010
Location: UK
Device: Kobo Forma, Icarus, iPad Mini 2, Kobo Touch, Google Nexus 7
Quote:
Originally Posted by theducks View Post
The question you want to think about is WHY it went bad.

Did you sync to another instance? Have your Library on a NAS or Shared drive?
If you don't fix the cause, it will happen again AND you will loose data or books.
Not to my knowledge, and no. It's most likely to do with importing from iCloud; one of the books was a massive PDF from Humble Bundle which I was having trouble downloading in the first place. Another was an early book and may have got issues when transferring from an older machine.

Anyway, the database on the source machine has been fixed; I'm now copying files to the target machine. Part of the issue seems to have been the s.l.o.w transfer via iCloud with a somewhat flaky Internet connection. I have another 10 or so files to copy across, then I'll try again.

Is there a way to purge the library on the target machine? That's actually an older instance, and the source machine is the current instance.
maddz is offline   Reply With Quote
Old 05-17-2026, 05:33 PM   #12
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: 31,771
Karma: 64144480
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
A purge? Just delete the Library folder contents.
No DB and No Books... No Library
BTW adding books (or DB) any other way (other than a total EXACT COPY while calibre is not running) is what leads to a corrupt Library.

Everything added or remove MUST be done by Calibre (except the COMPLETE restore)
theducks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
calibre corrupt error corrupt error database disk image is malformed didu812 Calibre 50 04-10-2024 08:51 AM
Database corrupt, what can I do? elstupid Calibre 7 05-14-2023 03:24 PM
Aura HD Corrupt database? patrik Kobo Reader 34 01-13-2014 02:10 AM
Corrupt database tonyjbird Introduce Yourself 5 04-03-2012 06:26 AM
Corrupt database jjansen Calibre 4 10-26-2011 11:51 PM


All times are GMT -4. The time now is 09:29 AM.


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