View Single Post
Old 05-24-2025, 03:47 PM   #10
MikesBooks
Member
MikesBooks began at the beginning.
 
Posts: 10
Karma: 10
Join Date: May 2025
Device: Kindle
Some success! In safe mode it took just over 24hrs, but it rebuilt and seemed to run fine. Only thing missing were my custom icons and custom metadata. I really hope I didn't lose those.

The calibre_db_restore_report.txt does show a few errors like this:
Spoiler:
D:\Full Library-2017-07-25\Alexander Mladenov\Sukhoi Su-25 Frogfoot (10759) with error:
Traceback (most recent call last):
File "calibre\db\restore.py", line 206, in scan_library
File "calibre\db\restore.py", line 231, in process_dir
File "calibre\db\restore.py", line 35, in read_opf
File "calibre\ebooks\metadata\opf2.py", line 642, in __init__
File "calibre\ebooks\metadata\utils.py", line 47, in parse_opf
File "calibre\utils\xml_parse.py", line 35, in safe_xml_fromstring
File "src/lxml/etree.pyx", line 3287, in lxml.etree.fromstring
File "src/lxml/parser.pxi", line 1989, in lxml.etree._parseMemoryDocument
File "src/lxml/parser.pxi", line 1876, in lxml.etree._parseDoc
File "src/lxml/parser.pxi", line 1164, in lxml.etree._BaseParser._parseDoc
File "src/lxml/parser.pxi", line 633, in lxml.etree._ParserContext._handleParseResultDoc
File "src/lxml/parser.pxi", line 743, in lxml.etree._handleParseResult
File "src/lxml/parser.pxi", line 672, in lxml.etree._raiseParseError
File "<string>", line 1
lxml.etree.XMLSyntaxError: StartTag: invalid element name, line 1, column 2


and

Spoiler:

Traceback (most recent call last):
File "calibre\db\restore.py", line 302, in restore_books
File "calibre\db\cache.py", line 85, in call_func_with_lock
File "calibre\db\cache.py", line 2938, in restore_book
File "calibre\db\cache.py", line 2156, in create_book_entry
File "calibre\db\backend.py", line 1171, in execute
File "C:\t\t\apsw-42s16m2x\src\cursor.c", line 240, in resetcursor
apsw.ConstraintError: ConstraintError: UNIQUE constraint failed: books.id


But it was just like 10 books so not a big deal.

When restarting the computer in normal mode I first got this error:

Spoiler:
calibre, version 8.4.100
ERROR: Bad database location: Bad database location 'D:\\Full Library-2017-07-25'. Will start with a new, empty calibre library

Traceback (most recent call last):
File "calibre\gui2\main.py", line 323, in initialize_db
File "calibre\db\legacy.py", line 192, in __init__
File "calibre\db\legacy.py", line 46, in create_backend
File "calibre\db\backend.py", line 551, in __init__
File "calibre\db\backend.py", line 990, in initialize_notes
File "calibre\db\notes\connect.py", line 76, in __init__
File "os.py", line 225, in makedirs
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'D:\\Full Library-2017-07-25\\.calnotes\\resources'


I changed it to run as administrator and it opened fine the first couple of times, and then it crashed hard the next few. Task manager shows nothing running in the background either, so it's a hard closure.

When I attempted to add 3 books (in admin mode), once again, hard closure, and I got that database error once. I retried and now I'm getting the original error when adding books:

Spoiler:
Traceback (most recent call last):
File "calibre\gui2\tag_browser\model.py", line 1389, in _get_category_nodes
File "calibre\db\cache.py", line 1555, in get_categories
File "calibre\db\categories.py", line 252, in get_categories
File "calibre\db\fields.py", line 183, in get_categories
File "calibre\db\fields.py", line 184, in <genexpr>
TypeError: '>' not supported between instances of 'generator' and 'int'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "calibre\gui2\tag_browser\view.py", line 1569, in recount
File "calibre\gui2\tag_browser\model.py", line 594, in rebuild_node_tree
File "calibre\gui2\tag_browser\model.py", line 607, in _run_rebuild
File "calibre\gui2\tag_browser\model.py", line 612, in _rebuild_node_tree
File "calibre\gui2\tag_browser\model.py", line 1396, in _get_category_nodes
File "calibre\db\cache.py", line 1555, in get_categories
File "calibre\db\categories.py", line 217, in get_categories
File "calibre\db\fields.py", line 604, in book_value_map
File "calibre\db\fields.py", line 604, in <dictcomp>
TypeError: unhashable type: 'dict'


It seemed to work fine under safe mode but still being problematic on regular.

This is a pretty new, clean build of windows, no a/v software like malwarebytes, it's on an internal hard drive and has been working fine since 2017!

Is there anything else I can try?

Thanks for the help!
MikesBooks is offline   Reply With Quote