View Single Post
Old 04-28-2024, 09:46 PM   #1
OpinionatedLurk
Junior Member
OpinionatedLurk began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2024
Device: none
DB Repair Failure

I had a drive go bad and had to switch to the backup, but one of my libraries on the backup is coming up corrupted. I clicked yes for Calibre to repair it but it gives me errors I don't understand. It won't open, even as a partial repair. I'm really hoping there's a fix for this. Help?

Code:
calibre, version 7.8.0
ERROR: Failed to repair library: Restoring database failed, click "Show details" to see details

Traceback (most recent call last):
  File "calibre\db\restore.py", line 329, in replace_db
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'K:\\Lib\\AO3\\metadata.db' -> 'K:\\Lib\\AO3\\metadata_pre_restore.db'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "calibre\db\restore.py", line 160, in run
  File "calibre\db\restore.py", line 334, in replace_db
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'K:\\Lib\\AO3\\metadata.db'


-------------
Failed to restore: tamedbanshee/if crazy equals genius (then I'm a (113793)
Traceback (most recent call last):
  File "calibre\db\restore.py", line 306, in restore_books
  File "calibre\db\cache.py", line 86, in call_func_with_lock
  File "calibre\db\cache.py", line 2924, in restore_book
  File "calibre\db\cache.py", line 2145, in create_book_entry
  File "calibre\db\backend.py", line 1147, in execute
  File "C:\t\t\apsw-42s16m2x\src\cursor.c", line 240, in resetcursor
apsw.ConstraintError: ConstraintError: UNIQUE constraint failed: books.id


-------------
Failed to restore: tamedbanshee/crack of the whip (blood in the cu (113800)
Traceback (most recent call last):
  File "calibre\db\restore.py", line 306, in restore_books
  File "calibre\db\cache.py", line 86, in call_func_with_lock
  File "calibre\db\cache.py", line 2924, in restore_book
  File "calibre\db\cache.py", line 2145, in create_book_entry
  File "calibre\db\backend.py", line 1147, in execute
  File "C:\t\t\apsw-42s16m2x\src\cursor.c", line 240, in resetcursor
apsw.ConstraintError: ConstraintError: UNIQUE constraint failed: books.id


-------------
Failed to restore: shirohebi/Hostile Land (131450)
Traceback (most recent call last):
  File "calibre\db\restore.py", line 306, in restore_books
  File "calibre\db\cache.py", line 86, in call_func_with_lock
  File "calibre\db\cache.py", line 2924, in restore_book
  File "calibre\db\cache.py", line 2145, in create_book_entry
  File "calibre\db\backend.py", line 1147, in execute
  File "C:\t\t\apsw-42s16m2x\src\cursor.c", line 240, in resetcursor
apsw.ConstraintError: ConstraintError: UNIQUE constraint failed: books.id


-------------
Failed to restore: CatChan/Sakurama - I _ Childhood (133710)
Traceback (most recent call last):
  File "calibre\db\restore.py", line 306, in restore_books
  File "calibre\db\cache.py", line 86, in call_func_with_lock
  File "calibre\db\cache.py", line 2924, in restore_book
  File "calibre\db\cache.py", line 2145, in create_book_entry
  File "calibre\db\backend.py", line 1147, in execute
  File "C:\t\t\apsw-42s16m2x\src\cursor.c", line 240, in resetcursor
apsw.ConstraintError: ConstraintError: UNIQUE constraint failed: books.id


-------------
Failed to restore: Nikkia/Call it a Senju Sandwich (134846)
Traceback (most recent call last):
  File "calibre\db\restore.py", line 306, in restore_books
  File "calibre\db\cache.py", line 86, in call_func_with_lock
  File "calibre\db\cache.py", line 2924, in restore_book
  File "calibre\db\cache.py", line 2145, in create_book_entry
  File "calibre\db\backend.py", line 1147, in execute
  File "C:\t\t\apsw-42s16m2x\src\cursor.c", line 240, in resetcursor
apsw.ConstraintError: ConstraintError: UNIQUE constraint failed: books.id
OpinionatedLurk is offline   Reply With Quote