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

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 02-13-2024, 02:23 PM   #1
JALindsay
Junior Member
JALindsay began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2023
Device: Kindle Scribe
Issue adding books to Calibre 7.5.1

Hey, all..

Having issues adding books to calibre in the past day or so.

Please see the log below.
Spoiler:

calibre, version 7.5.1
ERROR: Errors while adding: Failed to add any books, click "Show details" for more information


----------------------------------------------------------------------
Failed to add the book: The Things We Make
C:\Users\jerem\AppData\Local\Temp\calibre_1721gocx \i_pmxxxc_add_books\2\The Things We Make.epub
With error:
Traceback (most recent call last):
File "calibre\gui2\add.py", line 460, in add_book
File "calibre\db\legacy.py", line 341, in create_book_entry
File "calibre\db\cache.py", line 88, in call_func_with_lock
File "calibre\db\cache.py", line 2155, in create_book_entry
File "calibre\db\cache.py", line 1837, in set_metadata
File "calibre\db\cache.py", line 1823, in set_field
File "calibre\db\cache.py", line 1636, in set_field
File "calibre\db\write.py", line 573, in set_books
File "calibre\db\write.py", line 492, in many_many
File "calibre\db\backend.py", line 1144, in executemany
File "C:\t\t\apsw-42s16m2x\src\cursor.c", line 240, in resetcursor
apsw.ConstraintError: ConstraintError: Foreign key violation: authors is still referenced


----------------------------------------------------------------------
Failed to add the book: Edison's Ghosts
C:\Users\jerem\AppData\Local\Temp\calibre_1721gocx \i_pmxxxc_add_books\6\Edisons Ghosts.epub
With error:
Traceback (most recent call last):
File "calibre\gui2\add.py", line 460, in add_book
File "calibre\db\legacy.py", line 341, in create_book_entry
File "calibre\db\cache.py", line 88, in call_func_with_lock
File "calibre\db\cache.py", line 2155, in create_book_entry
File "calibre\db\cache.py", line 1837, in set_metadata
File "calibre\db\cache.py", line 1823, in set_field
File "calibre\db\cache.py", line 1636, in set_field
File "calibre\db\write.py", line 573, in set_books
File "calibre\db\write.py", line 492, in many_many
File "calibre\db\backend.py", line 1144, in executemany
File "C:\t\t\apsw-42s16m2x\src\cursor.c", line 240, in resetcursor
apsw.ConstraintError: ConstraintError: Foreign key violation: authors is still referenced


----------------------------------------------------------------------
Failed to add the book: The Lincoln Miracle
C:\Users\jerem\AppData\Local\Temp\calibre_1721gocx \i_pmxxxc_add_books\0\The Lincoln Miracle.epub
With error:
Traceback (most recent call last):
File "calibre\gui2\add.py", line 460, in add_book
File "calibre\db\legacy.py", line 341, in create_book_entry
File "calibre\db\cache.py", line 88, in call_func_with_lock
File "calibre\db\cache.py", line 2155, in create_book_entry
File "calibre\db\cache.py", line 1837, in set_metadata
File "calibre\db\cache.py", line 1823, in set_field
File "calibre\db\cache.py", line 1636, in set_field
File "calibre\db\write.py", line 573, in set_books
File "calibre\db\write.py", line 492, in many_many
File "calibre\db\backend.py", line 1144, in executemany
File "C:\t\t\apsw-42s16m2x\src\cursor.c", line 240, in resetcursor
apsw.ConstraintError: ConstraintError: Foreign key violation: authors is still referenced


----------------------------------------------------------------------
Failed to add the book: Is Math Real?
C:\Users\jerem\AppData\Local\Temp\calibre_1721gocx \i_pmxxxc_add_books\4\Is Math Real.epub
With error:
Traceback (most recent call last):
File "calibre\gui2\add.py", line 460, in add_book
File "calibre\db\legacy.py", line 341, in create_book_entry
File "calibre\db\cache.py", line 88, in call_func_with_lock
File "calibre\db\cache.py", line 2155, in create_book_entry
File "calibre\db\cache.py", line 1837, in set_metadata
File "calibre\db\cache.py", line 1823, in set_field
File "calibre\db\cache.py", line 1636, in set_field
File "calibre\db\write.py", line 573, in set_books
File "calibre\db\write.py", line 492, in many_many
File "calibre\db\backend.py", line 1144, in executemany
File "C:\t\t\apsw-42s16m2x\src\cursor.c", line 240, in resetcursor
apsw.ConstraintError: ConstraintError: Foreign key violation: authors is still referenced


----------------------------------------------------------------------
Failed to add the book: The Last Secret of the Secret Annex: The Untold Story of Anne Frank, Her Silent Protector, and a Family Betrayal
C:\Users\jerem\AppData\Local\Temp\calibre_1721gocx \i_pmxxxc_add_books\3\The Last Secret of the Secret Annex.epub
With error:
Traceback (most recent call last):
File "calibre\gui2\add.py", line 460, in add_book
File "calibre\db\legacy.py", line 341, in create_book_entry
File "calibre\db\cache.py", line 88, in call_func_with_lock
File "calibre\db\cache.py", line 2155, in create_book_entry
File "calibre\db\cache.py", line 1837, in set_metadata
File "calibre\db\cache.py", line 1823, in set_field
File "calibre\db\cache.py", line 1636, in set_field
File "calibre\db\write.py", line 573, in set_books
File "calibre\db\write.py", line 492, in many_many
File "calibre\db\backend.py", line 1144, in executemany
File "C:\t\t\apsw-42s16m2x\src\cursor.c", line 240, in resetcursor
apsw.ConstraintError: ConstraintError: Foreign key violation: authors is still referenced


----------------------------------------------------------------------
Failed to add the book: There Will Be Fire: Margaret Thatcher, the IRA, and Two Minutes That Changed History
C:\Users\jerem\AppData\Local\Temp\calibre_1721gocx \i_pmxxxc_add_books\5\There Will Be Fire.epub
With error:
Traceback (most recent call last):
File "calibre\gui2\add.py", line 460, in add_book
File "calibre\db\legacy.py", line 341, in create_book_entry
File "calibre\db\cache.py", line 88, in call_func_with_lock
File "calibre\db\cache.py", line 2155, in create_book_entry
File "calibre\db\cache.py", line 1837, in set_metadata
File "calibre\db\cache.py", line 1823, in set_field
File "calibre\db\cache.py", line 1636, in set_field
File "calibre\db\write.py", line 573, in set_books
File "calibre\db\write.py", line 492, in many_many
File "calibre\db\backend.py", line 1144, in executemany
File "C:\t\t\apsw-42s16m2x\src\cursor.c", line 240, in resetcursor
apsw.ConstraintError: ConstraintError: Foreign key violation: authors is still referenced


----------------------------------------------------------------------
Failed to add the book: The Essential Indian Instant Pot Cookbook: Authentic Flavors and Modern Recipes for Your Electric Pressure Cooker
C:\Users\jerem\AppData\Local\Temp\calibre_1721gocx \i_pmxxxc_add_books\1\The Essential Indian Instant Pot Cookbook.epub
With error:
Traceback (most recent call last):
File "calibre\gui2\add.py", line 460, in add_book
File "calibre\db\legacy.py", line 341, in create_book_entry
File "calibre\db\cache.py", line 88, in call_func_with_lock
File "calibre\db\cache.py", line 2155, in create_book_entry
File "calibre\db\cache.py", line 1837, in set_metadata
File "calibre\db\cache.py", line 1823, in set_field
File "calibre\db\cache.py", line 1636, in set_field
File "calibre\db\write.py", line 573, in set_books
File "calibre\db\write.py", line 492, in many_many
File "calibre\db\backend.py", line 1144, in executemany
File "C:\t\t\apsw-42s16m2x\src\cursor.c", line 240, in resetcursor
apsw.ConstraintError: ConstraintError: Foreign key violation: authors is still referenced

Last edited by theducks; 02-13-2024 at 03:15 PM. Reason: SPOILER LOG files
JALindsay is offline   Reply With Quote
Old 02-13-2024, 02:35 PM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,219
Karma: 145277352
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
A few months back, there was an issue with the same error message which the original poster said went away after shutting down their computer and then powering it back on. Another similar one, the OP found that they had a zombie calibre instance running which went away after a restart. In another case, Kovid Goyal suggested rebuilding the database (right clicking the library menu and choosing Library Maintenance => Restore database).
DNSB is offline   Reply With Quote
Old 02-13-2024, 04:57 PM   #3
JALindsay
Junior Member
JALindsay began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2023
Device: Kindle Scribe
Thanks for the help!
A restart didn't do the trick, but a database build did.
JALindsay is offline   Reply With Quote
Old 02-13-2024, 07:54 PM   #4
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,219
Karma: 145277352
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Good to hear that your problem has been resolved.
DNSB is offline   Reply With Quote
Old 02-14-2024, 03:35 AM   #5
Drolma-la
Junior Member
Drolma-la began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2018
Device: iPad
Same problem

I had the same problem adding new books after upgrading to 7.5.1. I tried the recommended remedies. Rebooting the computer did not help. Restoring the Library was a disaster. I rolled everything back to when all was well from a backup, then tentatively upgraded again. Everything seems to be OK now.
Drolma-la 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
Tolino Vision 4 HD adding books issue thaiphd Tolino 2 07-22-2021 06:20 AM
Calibre or Kobo? Re-adding books issue. SmokeAndMirrors Kobo Reader 18 01-25-2015 02:57 AM
HD Odd Issue Adding Books to My Fire KindleMama Kindle Fire 8 10-21-2012 05:56 PM
Calibre GUI and Mac OS X issue adding books? slantybard Calibre 10 02-21-2009 09:25 AM


All times are GMT -4. The time now is 07:28 AM.


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