Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-03-2024, 08:25 AM   #1
hinyarii
Junior Member
hinyarii began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jun 2024
Device: Kobo Libra 2
Could not restore corrupted library due to NotADirectoryError

Hi all,
Just turned on Calibre today on my thumbdrive and found out my library was corrupted, in-built repair feature doesn't seem to work. I suspect I might have turned off my PC w/o ejecting one day and that corrupted it. Been trying to fix it but to no avail. Searched online for the error I got but can't seem to find anybody else that has faced this issue; ok with sending my library if it helps w troubleshooting.

Wld rly appreciate if anyb here knows how I can fix this, as it contains a lot of my files. Thank you!

calibre, version 7.12.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 157, in run
File "calibre\db\restore.py", line 316, in restore_books
File "calibre\db\backend.py", line 1049, in restore_notes
File "calibre\db\notes\connect.py", line 471, in restore
NotADirectoryError: [WinError 267] The directory name is invalid: 'D:\\Calibre Portable\\20w3j86v_rlib\\.calnotes\\resources\\des ktop.ini'
hinyarii is offline   Reply With Quote
Old 06-03-2024, 01:50 PM   #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: 44,566
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
delete the desktop.ini file references in the error message and you will be fine.
kovidgoyal is offline   Reply With Quote
Advert
Old 06-04-2024, 05:58 AM   #3
hinyarii
Junior Member
hinyarii began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jun 2024
Device: Kobo Libra 2
Quote:
Originally Posted by kovidgoyal View Post
delete the desktop.ini file references in the error message and you will be fine.
Hey, thanks kovidgoyal, seems to have fixed that error. Ran into a new error though:

calibre, version 7.12.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: 'D:\\Calibre Portable\\Calibre Library 2\\metadata.db' -> 'D:\\Calibre Portable\\Calibre Library 2\\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: 'D:\\Calibre Portable\\Calibre Library 2\\metadata.db'

Sorry to bother you again, and thanks so much
hinyarii is offline   Reply With Quote
Old 06-04-2024, 12:39 PM   #4
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: 44,566
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Try doing the restore in safe mode or alternately run it via the command line

calibredb restore_database -r
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Corrupted library won't restore Geta Library Management 9 02-04-2022 01:41 PM
Restore annotations from corrupted db Lucas Malor Kobo Reader 9 11-29-2016 06:01 PM
Corrupted Library Won't Restore pkw57 Library Management 6 04-02-2016 06:32 AM
Mac version: corrupted database - restore fails neilio Calibre 3 04-08-2013 05:28 PM


All times are GMT -4. The time now is 04:15 PM.


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