Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-10-2021, 03:46 PM   #31
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,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
NO it take minutes.
We are NOT talking about REPAIR, just the basic integrity check
theducks is online now   Reply With Quote
Old 12-11-2021, 07:25 AM   #32
Wajalot
Junior Member
Wajalot began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2021
Device: Kindle
Quote:
Originally Posted by theducks View Post
NO it take minutes.
We are NOT talking about REPAIR, just the basic integrity check
Hi
Firstly thanks for your time and answering.


I've done it. Nothing changes. Still the same error when I try to delete that specific book.

Is there anyway to remove a entry from the database using a command in a terminal?
Wajalot is offline   Reply With Quote
Advert
Old 12-11-2021, 07:35 AM   #33
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,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use

calibre-debug --reinitialize-db /path/to/metadata.db

that will dump the SQL and recreate the db with th edump. That might fix the corruption.
kovidgoyal is offline   Reply With Quote
Old 12-11-2021, 09:00 AM   #34
criscros
Fulltime reader
criscros can eat soup with a fork.criscros can eat soup with a fork.criscros can eat soup with a fork.criscros can eat soup with a fork.criscros can eat soup with a fork.criscros can eat soup with a fork.criscros can eat soup with a fork.criscros can eat soup with a fork.criscros can eat soup with a fork.criscros can eat soup with a fork.criscros can eat soup with a fork.
 
Posts: 44
Karma: 9296
Join Date: Mar 2021
Device: Kobo Clara
Just wanted to add that I experienced a similar problem with 5.33.2.
I tried to delete a book and calibre just shut down. I thought it was the book, but I tried other books with the same result. Calibre just shut down. It does let me remove files from the book and even convert it, but not delete it even when it's an empty book. I ran Library Maintenance, and nothing came up or changed.

Since I had a backup of 5.32, I just restored the calibre files to the last version and I can now delete.
criscros is offline   Reply With Quote
Old 04-24-2022, 01:08 PM   #35
sirveykan
Junior Member
sirveykan began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2016
Device: laptop
I'm using 5.40
getting this error only on two pdf books

Traceback (most recent call last):
File "calibre\gui2\library\models.py", line 1150, in setData
File "calibre\gui2\library\models.py", line 1220, in _set_data
File "calibre\db\legacy.py", line 926, in func
File "calibre\db\cache.py", line 74, in call_func_with_lock
File "calibre\db\cache.py", line 1239, in set_field
File "calibre\db\write.py", line 565, in set_books
File "calibre\db\write.py", line 473, in many_many
File "calibre\db\backend.py", line 947, in executemany
apsw.ConstraintError: ConstraintError: UNIQUE constraint failed: books_languages_link.book, books_languages_link.lang_code


help plz
thnx in advance
sirveykan is offline   Reply With Quote
Advert
Old 04-26-2022, 01:05 PM   #36
sirveykan
Junior Member
sirveykan began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2016
Device: laptop
Quote:
Originally Posted by sirveykan View Post
I'm using 5.40
getting this error only on two pdf books

Traceback (most recent call last):
File "calibre\gui2\library\models.py", line 1150, in setData
File "calibre\gui2\library\models.py", line 1220, in _set_data
File "calibre\db\legacy.py", line 926, in func
File "calibre\db\cache.py", line 74, in call_func_with_lock
File "calibre\db\cache.py", line 1239, in set_field
File "calibre\db\write.py", line 565, in set_books
File "calibre\db\write.py", line 473, in many_many
File "calibre\db\backend.py", line 947, in executemany
apsw.ConstraintError: ConstraintError: UNIQUE constraint failed: books_languages_link.book, books_languages_link.lang_code


help plz
thnx in advance

I've restored the library and the problem is now solved
sirveykan is offline   Reply With Quote
Old 04-18-2023, 04:00 PM   #37
Shaade
Junior Member
Shaade began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2023
Device: Kon-Tiki 2
My calibre library gets corrupted very often, and I have to rebuild it almost on a daily basis. I don't have specific steps, but seems related to changing author/title for existing books. Is anybody else experiencing a similar issue?
Shaade is offline   Reply With Quote
Old 04-18-2023, 04:17 PM   #38
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,809
Karma: 54830978
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 Shaade View Post
My calibre library gets corrupted very often, and I have to rebuild it almost on a daily basis. I don't have specific steps, but seems related to changing author/title for existing books. Is anybody else experiencing a similar issue?
I suspect your Library is on a NAS or cloud (shared) drive. A no-no (in the FAQ) as timing is everything. LOCAL drives only and not full time cloud backing.

Another cause is 2 (GUI) instances accessing the same Library. Server was designed to allow multiple users without direct access to the DB. The DB is cached, so there is no communications between instances.
theducks is online now   Reply With Quote
Old 04-18-2023, 05:45 PM   #39
Shaade
Junior Member
Shaade began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2023
Device: Kon-Tiki 2
Thank you for the prompt answer. I do not have the library on a NAS. I am thinking that Kasperky anti-virus may monitor files, so I've added the calibre folder to its exclusions.
This corruption seems a more recent development. It had happened to me in the past, but it occurred very rarely. Now it happens almost every second day.
Shaade is offline   Reply With Quote
Old 04-18-2023, 05:57 PM   #40
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,639
Karma: 61234567
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Just to rule out hardware issues, would advise to run HDDScan and Memtest86.
ownedbycats is offline   Reply With Quote
Old 04-18-2023, 07:46 PM   #41
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,809
Karma: 54830978
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 Shaade View Post
Thank you for the prompt answer. I do not have the library on a NAS. I am thinking that Kasperky anti-virus may monitor files, so I've added the calibre folder to its exclusions.
This corruption seems a more recent development. It had happened to me in the past, but it occurred very rarely. Now it happens almost every second day.
The Library folder should be added to the white list.
I would expect Calibre (the program) to be popping A/V warnings if that was the issue (and if it does not warn that it did something makes it a reason to ditch K )
theducks is online now   Reply With Quote
Old 03-18-2024, 03:25 PM   #42
Chirishman
Junior Member
Chirishman began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jul 2009
Device: Kindle 1
Quote:
Originally Posted by kovidgoyal View Post
Use

calibre-debug --reinitialize-db /path/to/metadata.db

that will dump the SQL and recreate the db with th edump. That might fix the corruption.
Has this been removed or replaced? I'm currently getting No Such Option:

Code:
calibre-debug: error: no such option: --reinitialize-db
Chirishman is offline   Reply With Quote
Old 03-18-2024, 03:40 PM   #43
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,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
THE ONLINE USER MANUAL IS YOUR FRIEND

the page you want is:
https://manual.calibre-ebook.com/gen...store-database
theducks is online now   Reply With Quote
Old 03-18-2024, 03:46 PM   #44
Chirishman
Junior Member
Chirishman began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jul 2009
Device: Kindle 1
Quote:
Originally Posted by theducks View Post
THE ONLINE USER MANUAL IS YOUR FRIEND

the page you want is:
https://manual.calibre-ebook.com/gen...store-database
Restore and Reinitialize are two different things. Kovid mentions both in this thread.

Restore reconstitutes the database from the OPF files, while Reinitialize-from the given description anyway-will dump the existing sql db, recreate the tables, and then attempt to re-import the dumped data.

I found that command also in this manpage but like I said it doesn't seem to exist anymore and I haven't found any notes about it being deprecated which is why I've asked.
Chirishman is offline   Reply With Quote
Old 03-18-2024, 11:15 PM   #45
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,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Chirishman View Post
Has this been removed or replaced? I'm currently getting No Such Option:

Code:
calibre-debug: error: no such option: --reinitialize-db
Yes, it doesnt exist anymore. You want to restore database from command line use calibredb restore_database. There is no longer any roudtrip via sql function.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR - database disk image malformed Joy1977 Calibre 2 05-11-2012 11:28 PM
Calibre + Kobo Touch error message : database disk image is malformed Bernard75 Devices 1 04-07-2012 03:46 PM
Kobo error: database disk image is malformed RSaunders Devices 7 07-28-2011 09:52 PM
Error communicating with device(Kobo Wireless)/database disk image is malformed cotej1977 Kobo Reader 1 04-24-2011 08:14 AM
Corrupt database message error: Disk is Full? Debby Calibre 3 03-09-2011 03:23 PM


All times are GMT -4. The time now is 02:53 AM.


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