noDRM / DeDRM_tools

DeDRM tools for ebooks
7.04k stars 314 forks source link

Can't convert KFX | YJFragmentList get has multiple matches #475

Closed h43lb1t0 closed 8 months ago

h43lb1t0 commented 8 months ago

Question / bug report

calibre, version 7.3.0 ERROR: KFX conversion failed:

Cannot convert Die Neuerfindung der Diktatur: Wie China den digitalen Überwachungsstaat aufbaut und uns damit herausfordert (German Edition)

KeyError('YJFragmentList get has multiple matches for c0:: $260::: c0:: $260::, c0:: $260::')

I have copied the files from my Kindle paperwhite 7th generation. I don't get a has DRM error.

Which version of Calibre are you running?

7.3.0

Which version of the DeDRM plugin are you running?

v10.0.9

If applicable, which version of the Kindle software are you running?

5.16.2.1.1

Log output

DeDRM v10.0.9: Trying to decrypt ssjvohdv.kfx-zip
Decrypting KFX-ZIP ebook: ssjvohdv
Found 1 keys to try after 0.7 seconds
The .kfx-zip archive does not contain an encrypted DRMION file
Decryption succeeded after 0.7 seconds
DeDRM v10.0.9: Finished after 0.7 seconds
Conversion options changed from defaults:
  output_profile: 'kindle_pw3'
  verbose: 2
  read_metadata_from_opf: 'C:\\Users\\tom\\AppData\\Local\\Temp\\calibre__ly9gbn5\\wqk0pplq.opf'
  cover: 'C:\\Users\\tom\\AppData\\Local\\Temp\\calibre__ly9gbn5\\e4nbm_dw.jpeg'
Resolved conversion options
calibre version: 7.3.0
{'allow_conversion_with_errors': False,
 'asciiize': False,
 'author_sort': None,
 'authors': None,
 'base_font_size': 0.0,
 'book_producer': None,
 'change_justification': 'original',
 'chapter': "//*[((name()='h1' or name()='h2') and re:test(., "
            "'\\s*((chapter|book|section|part)\\s+)|((prolog|prologue|epilogue)(\\s+|$))', "
            "'i')) or @class = 'chapter']",
 'chapter_mark': 'pagebreak',
 'comments': None,
 'cover': 'C:\\Users\\tom\\AppData\\Local\\Temp\\calibre__ly9gbn5\\e4nbm_dw.jpeg',
 'debug_pipeline': None,
 'dehyphenate': True,
 'delete_blank_paragraphs': True,
 'disable_font_rescaling': False,
 'dont_compress': False,
 'duplicate_links_in_toc': False,
 'embed_all_fonts': False,
 'embed_font_family': None,
 'enable_heuristics': False,
 'expand_css': False,
 'extra_css': None,
 'extract_to': None,
 'filter_css': '',
 'fix_indents': True,
 'font_size_mapping': None,
 'format_scene_breaks': True,
 'html_unwrap_factor': 0.4,
 'input_encoding': None,
 'input_profile': <calibre.customize.profiles.InputProfile object at 0x0000020402287490>,
 'insert_blank_line': False,
 'insert_blank_line_size': 0.5,
 'insert_metadata': False,
 'isbn': None,
 'italicize_common_cases': True,
 'keep_ligatures': False,
 'language': None,
 'level1_toc': None,
 'level2_toc': None,
 'level3_toc': None,
 'line_height': 0.0,
 'linearize_tables': False,
 'margin_bottom': 5.0,
 'margin_left': 5.0,
 'margin_right': 5.0,
 'margin_top': 5.0,
 'markup_chapter_headings': True,
 'max_toc_links': 50,
 'minimum_line_height': 120.0,
 'mobi_file_type': 'old',
 'mobi_ignore_margins': False,
 'mobi_keep_original_images': False,
 'mobi_toc_at_start': False,
 'no_chapters_in_toc': False,
 'no_inline_navbars': True,
 'no_inline_toc': False,
 'output_profile': <calibre.customize.profiles.KindlePaperWhite3Output object at 0x0000020402296610>,
 'page_breaks_before': '/',
 'personal_doc': '[PDOC]',
 'prefer_author_sort': False,
 'prefer_metadata_cover': False,
 'pretty_print': False,
 'pubdate': None,
 'publisher': None,
 'rating': None,
 'read_metadata_from_opf': 'C:\\Users\\tom\\AppData\\Local\\Temp\\calibre__ly9gbn5\\wqk0pplq.opf',
 'remove_fake_margins': True,
 'remove_first_image': False,
 'remove_paragraph_spacing': False,
 'remove_paragraph_spacing_indent_size': 1.5,
 'renumber_headings': True,
 'replace_scene_breaks': '',
 'search_replace': '[]',
 'series': None,
 'series_index': None,
 'share_not_sync': False,
 'smarten_punctuation': False,
 'sr1_replace': None,
 'sr1_search': None,
 'sr2_replace': None,
 'sr2_search': None,
 'sr3_replace': None,
 'sr3_search': None,
 'start_reading_at': None,
 'subset_embedded_fonts': False,
 'tags': None,
 'timestamp': None,
 'title': None,
 'title_sort': None,
 'toc_filter': None,
 'toc_threshold': 6,
 'toc_title': None,
 'transform_css_rules': '[]',
 'transform_html_rules': '[]',
 'unsmarten_punctuation': False,
 'unwrap_lines': True,
 'use_auto_toc': False,
 'verbose': 2}
DeDRM v10.0.9: Trying to decrypt _882s9d1.kfx-zip
Decrypting KFX-ZIP ebook: _882s9d1
Found 1 keys to try after 0.0 seconds
The .kfx-zip archive does not contain an encrypted DRMION file
Decryption succeeded after 0.0 seconds
DeDRM v10.0.9: Finished after 0.0 seconds
InputFormatPlugin: KFX Input running
on C:\Users\tom\AppData\Local\Temp\calibre__ly9gbn5\i1w0k71h.kfx-zip
Software versions: KFX Input 2.7.0, calibre 7.3, Windows-10-10.0.19045-SP0
KFX Input plugin help is available at https://www.mobileread.com/forums/showthread.php?t=291290
Converting C:\Users\tom\AppData\Local\Temp\calibre__ly9gbn5\i1w0k71h.kfx-zip
Processing container: CR!SJWFRP9MA53JZ00QVFJCTVZNXPE8.kfx
Processing container: CR!XT3HEGR9VN319BS2QRM4ESV5973J.kfx
Processing container: Die Neuerfindung der Diktatur_ Wie China den digitalen Überwachungsstaat aufbaut und uns damit herausfordert_B07GSBBZBK.kfx
Processing container: Die Neuerfindung der Diktatur_ Wie China den digitalen Überwachungsstaat aufbaut und uns damit herausfordert_B07GSBBZBK.kfx
Processing container: metadata.kfx
ERROR: Multiple $264 fragments present (only one allowed per book)
ERROR: Multiple $265 fragments present (only one allowed per book)
ERROR: Multiple $395 fragments present (only one allowed per book)
ERROR: Multiple $538 fragments present (only one allowed per book)
ERROR: Multiple $550 fragments present (only one allowed per book)
ERROR: Multiple $621 fragments present (only one allowed per book)
WARNING: Large JXR resource e3F image resource/rsrc1PJ is 100649 bytes
WARNING: Large JXR resource e6S image resource/rsrc1PM is 99307 bytes
WARNING: Large JXR resource e86 image resource/rsrc1PN is 100164 bytes
WARNING: Large JXR resource eEZ image resource/rsrc1PS is 103592 bytes
WARNING: Large JXR resource eGP image resource/rsrc1PT is 100762 bytes
WARNING: Large JXR resource eP6 image resource/rsrc1PV is 100626 bytes
WARNING: Large JXR resource eSX image resource/rsrc1PX is 101188 bytes
WARNING: Large JXR resource eU0 image resource/rsrc1PY is 100930 bytes
WARNING: Large JXR resource eUZ image resource/rsrc1PZ is 100016 bytes
WARNING: Large JXR resource eXY image resource/rsrc1R0 is 100612 bytes
WARNING: Large JXR resource eZ7 image resource/rsrc1R1 is 100995 bytes
Traceback (most recent call last):
  File "calibre_plugins.kfx_input.__init__", line 102, in convert
  File "calibre_plugins.kfx_input.kfxlib.yj_book", line 223, in decode_book
  File "calibre_plugins.kfx_input.kfxlib.yj_structure", line 695, in check_consistency
  File "calibre_plugins.kfx_input.kfxlib.yj_position_location", line 107, in check_position_and_location_maps
  File "calibre_plugins.kfx_input.kfxlib.yj_position_location", line 554, in collect_content_position_info
  File "calibre_plugins.kfx_input.kfxlib.yj_position_location", line 532, in collect_section_position_info
  File "calibre_plugins.kfx_input.kfxlib.yj_container", line 327, in __getitem__
  File "calibre_plugins.kfx_input.kfxlib.yj_container", line 322, in get
KeyError: 'YJFragmentList get has multiple matches for c0:: $260::: c0:: $260::, c0:: $260::'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "runpy.py", line 198, in _run_module_as_main
  File "runpy.py", line 88, in _run_code
  File "site.py", line 95, in <module>
  File "site.py", line 90, in main
  File "site.py", line 50, in run_entry_point
  File "calibre\utils\ipc\worker.py", line 215, in main
  File "calibre\gui2\convert\gui_conversion.py", line 38, in gui_convert_override
  File "calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert
  File "calibre\ebooks\conversion\plumber.py", line 1108, in run
  File "calibre\customize\conversion.py", line 242, in __call__
  File "calibre_plugins.kfx_input.__init__", line 124, in convert
calibre.ebooks.conversion.ConversionUserFeedBack: {"msg": "<b>Cannot convert Die Neuerfindung der Diktatur: Wie China den digitalen \u00dcberwachungsstaat aufbaut und uns damit herausfordert (German Edition)</b><br><br>KeyError('YJFragmentList get has multiple matches for c0:: $260::: c0:: $260::, c0:: $260::')", "level": "error", "det_msg": "", "title": "KFX conversion failed"}
h43lb1t0 commented 8 months ago

my Kindle made a update between trying to convert and opening this issue. I've downloaded the book again and now it's working.