noDRM / DeDRM_tools

DeDRM tools for ebooks
7.27k stars 323 forks source link

Can't Convert #597

Open JopTyrtle opened 3 months ago

JopTyrtle commented 3 months ago

Question / bug report

Can't convert Amazon Kindle Textbook to pdf with De-DRM and KFX plugin installed

Which version of Calibre are you running?

7.16

Which version of the DeDRM plugin are you running?

v10.0.9

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

2.4.70946

Log output

calibre 7.16  embedded-python: True
Windows-10-10.0.22631-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.22631')
Python 3.11.5
Windows: ('10', '10.0.22631', 'SP0', 'Multiprocessor Free')
Interface language: None
EXE path: C:\Program Files\Calibre2\calibre-debug.exe
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 15, 0) && DeDRM (10, 0, 9) && Package KFX (from KFX Input) (2, 15, 0) && KFX metadata reader (from KFX Input) (2, 15, 0) && From KFX (2, 15, 0) && KFX Input (2, 15, 0)
QPA platform: windows
devicePixelRatio: 2.0
logicalDpi: 96.0 x 96.0
physicalDpi: 108.01328903654485 x 108.08510638297872
ApplicationPaletteChange event ignored
Using calibre Qt style: True
ApplicationPaletteChange event received
[0.00] Starting up...
[0.00] Showing splash screen...
[0.17] splash screen shown
[0.17] Initializing db...
[0.17] db initialized
[0.17] Constructing main UI...
qt.gui.imageio: libpng warning: iCCP: known incorrect sRGB profile
[1.00] GUI main window shown
[1.05] main UI initialized...
[1.05] Hiding splash screen
[1.38] splash screen hidden
[1.38] Started up in 1.38 seconds with 1 books
stdout+stderr from file dialog helper: [b'', b'']
piped data from file dialog helper: [b'\xc4\xdc\xb2^h^\xc0\xf3\xc4%\x1fB\x970\xc1\x87y\xb3cZ`\xecP\xe6\xce\x9c\x02\xd4\xa9\x91\xe3\x19', b'C:\\Users\\nguye\\Documents\\My Kindle Content\\B07R5CFD6J_EBOK\\B07R5CFD6J_EBOK.azw']
Gather KFX-ZIP (from KFX Input) 2.15.0: Importing C:\Users\nguye\Documents\My Kindle Content\B07R5CFD6J_EBOK\B07R5CFD6J_EBOK.azw
Gather KFX-ZIP (from KFX Input): Gathered 10 file(s) as C:\Users\nguye\AppData\Local\Temp\calibre_8wk29u3e\u5e_sg5y.kfx-zip
DeDRM v10.0.9: Trying to decrypt u5e_sg5y.kfx-zip
Decrypting KFX-ZIP ebook: u5e_sg5y
Got DSN key from database kindle_key_1704748211_1
Found 1 keys to try after 0.4 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.9b943ee1-070b-4ae9-9709-b000743cfddd.voucher
Traceback (most recent call last):
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 103, in _assert
Exception: Unknown type encountered in envelope, expected VoucherEnvelope
Traceback (most recent call last):
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 103, in _assert
Exception: Unknown type encountered in envelope, expected VoucherEnvelope
DeDRM v10.0.9: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key
DeDRM v10.0.9: Looking for new default Kindle Key after 0.4 seconds
searching for kinfoFiles in C:\Users\nguye\AppData\Local
Found K4PC 1.25+ kinf2018 file: C:\Users\nguye\AppData\Local\Amazon\Kindle\storage\.kinf2018
Decrypted key file using IDString '3054772468' and UserName 'nguye'
DeDRM v10.0.9: Found 1 new key
Decrypting KFX-ZIP ebook: u5e_sg5y
Got DSN key from database key_0
Found 1 keys to try after 0.6 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.9b943ee1-070b-4ae9-9709-b000743cfddd.voucher
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 103, in _assert
Exception: Unknown type encountered in envelope, expected VoucherEnvelope
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 103, in _assert
Exception: Unknown type encountered in envelope, expected VoucherEnvelope
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 965, in KindleMobiDecrypt
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key
DeDRM v10.0.9: Ultimately failed to decrypt after 0.6 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md
Running file type plugin DeDRM failed with traceback:
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "calibre\customize\ui.py", line 199, in _run_filetype_plugins
  File "calibre_plugins.dedrm.__init__", line 1030, in run
  File "calibre_plugins.dedrm.__init__", line 981, in KindleMobiDecrypt
calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.9: Ultimately failed to decrypt after 0.6 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md
Package KFX (from KFX Input) 2.15.0: Packaging C:\Users\nguye\AppData\Local\Temp\calibre_8wk29u3e\u5e_sg5y.kfx-zip
Processing container: B07R5CFD6J_EBOK.azw
Running file type plugin Package KFX (from KFX Input) failed with traceback:
Traceback (most recent call last):
  File "calibre\customize\ui.py", line 199, in _run_filetype_plugins
  File "calibre_plugins.kfx_input.package_filetype", line 23, in run
  File "calibre_plugins.kfx_input.package_filetype", line 34, in package_kfx
  File "calibre_plugins.kfx_input.kfxlib.yj_book", line 79, in convert_to_single_kfx
  File "calibre_plugins.kfx_input.kfxlib.yj_book", line 212, in decode_book
  File "calibre_plugins.kfx_input.kfxlib.yj_book", line 321, in get_container
calibre_plugins.kfx_input.kfxlib.utilities.KFXDRMError: Book container B07R5CFD6J_EBOK.azw has DRM and cannot be converted
KFX metadata reader (from KFX Input) activated for C:\Users\nguye\AppData\Local\Temp\calibre_8wk29u3e\hrnxdvrq_add_books\0\B07R5CFD6J_EBOK.kfx-zip
Added Cyber Crime and Cyber Terrorism (What's New in Criminal Justice) to db in: 0.2
Added 1 books in 1.6 seconds
Worker Launch took: 0.01 seconds
Job: 0 Convert book 1 of 1 (Cyber Crime and Cyber Terrorism (What's New in Criminal Justice)) finished
Convert book 1 of 1 (Cyber Crime and Cyber Terrorism (What's New in Criminal Justice))
        DeDRM v10.0.9: Trying to decrypt 66suy1_r.kfx-zip
        Decrypting KFX-ZIP ebook: 66suy1_r
        Got DSN key from database kindle_key_1704748211_1
        Found 1 keys to try after 0.5 seconds
        Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.9b943ee1-070b-4ae9-9709-b000743cfddd.voucher
        Traceback (most recent call last):
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 103, in _assert
        Exception: Unknown type encountered in envelope, expected VoucherEnvelope
        Traceback (most recent call last):
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 103, in _assert
        Exception: Unknown type encountered in envelope, expected VoucherEnvelope
        DeDRM v10.0.9: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key
        DeDRM v10.0.9: Looking for new default Kindle Key after 0.5 seconds
        searching for kinfoFiles in C:\Users\nguye\AppData\Local
        Found K4PC 1.25+ kinf2018 file: C:\Users\nguye\AppData\Local\Amazon\Kindle\storage\.kinf2018
        Decrypted key file using IDString '3054772468' and UserName 'nguye'
        DeDRM v10.0.9: Found 1 new key
        Decrypting KFX-ZIP ebook: 66suy1_r
        Got DSN key from database key_0
        Found 1 keys to try after 0.6 seconds
        Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.9b943ee1-070b-4ae9-9709-b000743cfddd.voucher
        Traceback (most recent call last):
          File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
        Exception: Failed to decrypt KFX DRM voucher with any key

        During handling of the above exception, another exception occurred:

        Traceback (most recent call last):
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 103, in _assert
        Exception: Unknown type encountered in envelope, expected VoucherEnvelope
        Traceback (most recent call last):
          File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
        Exception: Failed to decrypt KFX DRM voucher with any key

        During handling of the above exception, another exception occurred:

        Traceback (most recent call last):
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 103, in _assert
        Exception: Unknown type encountered in envelope, expected VoucherEnvelope
        Traceback (most recent call last):
          File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
        Exception: Failed to decrypt KFX DRM voucher with any key

        During handling of the above exception, another exception occurred:

        Traceback (most recent call last):
          File "calibre_plugins.dedrm.__init__", line 965, in KindleMobiDecrypt
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
        Exception: Failed to decrypt KFX DRM voucher with any key
        DeDRM v10.0.9: Ultimately failed to decrypt after 0.6 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md
        Running file type plugin DeDRM failed with traceback:
        Traceback (most recent call last):
          File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
        Exception: Failed to decrypt KFX DRM voucher with any key

        During handling of the above exception, another exception occurred:

        Traceback (most recent call last):
          File "calibre\customize\ui.py", line 199, in _run_filetype_plugins
          File "calibre_plugins.dedrm.__init__", line 1030, in run
          File "calibre_plugins.dedrm.__init__", line 981, in KindleMobiDecrypt
        calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.9: Ultimately failed to decrypt after 0.6 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md
        Conversion options changed from defaults:
          pdf_sans_family: 'Tahoma'
          pdf_serif_family: 'Tahoma'
          enable_heuristics: True
          verbose: 2
          pdf_mono_family: 'Courier New'
          read_metadata_from_opf: 'C:\\Users\\nguye\\AppData\\Local\\Temp\\calibre_8wk29u3e\\pv4orfiv.opf'
          cover: 'C:\\Users\\nguye\\AppData\\Local\\Temp\\calibre_8wk29u3e\\apk6og3s.jpeg'
          allow_conversion_with_errors: True
        Resolved conversion options
        calibre version: 7.16.0
        {'add_alt_text_to_img': False,
         'allow_conversion_with_errors': True,
         '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\\nguye\\AppData\\Local\\Temp\\calibre_8wk29u3e\\apk6og3s.jpeg',
         'custom_size': None,
         'debug_pipeline': None,
         'dehyphenate': True,
         'delete_blank_paragraphs': True,
         'disable_font_rescaling': False,
         'duplicate_links_in_toc': False,
         'embed_all_fonts': False,
         'embed_font_family': None,
         'enable_heuristics': True,
         'expand_css': False,
         'extra_css': 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 0x0000016E7BC5B1D0>,
         '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,
         'no_chapters_in_toc': False,
         'no_inline_navbars': False,
         'output_profile': <calibre.customize.profiles.OutputProfile object at 0x0000016E7BC56550>,
         'page_breaks_before': '/',
         'paper_size': 'letter',
         'pdf_add_toc': False,
         'pdf_default_font_size': 20,
         'pdf_footer_template': None,
         'pdf_header_template': None,
         'pdf_hyphenate': False,
         'pdf_mark_links': False,
         'pdf_mono_family': 'Courier New',
         'pdf_mono_font_size': 16,
         'pdf_no_cover': False,
         'pdf_odd_even_offset': 0.0,
         'pdf_page_margin_bottom': 72.0,
         'pdf_page_margin_left': 72.0,
         'pdf_page_margin_right': 72.0,
         'pdf_page_margin_top': 72.0,
         'pdf_page_number_map': None,
         'pdf_page_numbers': False,
         'pdf_sans_family': 'Tahoma',
         'pdf_serif_family': 'Tahoma',
         'pdf_standard_font': 'serif',
         'pdf_use_document_margins': False,
         'prefer_metadata_cover': False,
         'preserve_cover_aspect_ratio': False,
         'pretty_print': False,
         'pubdate': None,
         'publisher': None,
         'rating': None,
         'read_metadata_from_opf': 'C:\\Users\\nguye\\AppData\\Local\\Temp\\calibre_8wk29u3e\\pv4orfiv.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,
         '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': '[]',
         'uncompressed_pdf': False,
         'unit': 'inch',
         'unsmarten_punctuation': False,
         'unwrap_lines': True,
         'use_auto_toc': False,
         'use_profile_size': False,
         'verbose': 2}
        DeDRM v10.0.9: Trying to decrypt 66suy1_r.kfx-zip
        Decrypting KFX-ZIP ebook: 66suy1_r
        Got DSN key from database kindle_key_1704748211_1
        Found 1 keys to try after 0.0 seconds
        Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.9b943ee1-070b-4ae9-9709-b000743cfddd.voucher
        Traceback (most recent call last):
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 103, in _assert
        Exception: Unknown type encountered in envelope, expected VoucherEnvelope
        Traceback (most recent call last):
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 103, in _assert
        Exception: Unknown type encountered in envelope, expected VoucherEnvelope
        DeDRM v10.0.9: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key
        DeDRM v10.0.9: Looking for new default Kindle Key after 0.0 seconds
        searching for kinfoFiles in C:\Users\nguye\AppData\Local
        Found K4PC 1.25+ kinf2018 file: C:\Users\nguye\AppData\Local\Amazon\Kindle\storage\.kinf2018
        Decrypted key file using IDString '3054772468' and UserName 'nguye'
        DeDRM v10.0.9: Found 1 new key
        Decrypting KFX-ZIP ebook: 66suy1_r
        Got DSN key from database key_0
        Found 1 keys to try after 0.1 seconds
        Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.9b943ee1-070b-4ae9-9709-b000743cfddd.voucher
        Traceback (most recent call last):
          File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
        Exception: Failed to decrypt KFX DRM voucher with any key

        During handling of the above exception, another exception occurred:

        Traceback (most recent call last):
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 103, in _assert
        Exception: Unknown type encountered in envelope, expected VoucherEnvelope
        Traceback (most recent call last):
          File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
        Exception: Failed to decrypt KFX DRM voucher with any key

        During handling of the above exception, another exception occurred:

        Traceback (most recent call last):
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 103, in _assert
        Exception: Unknown type encountered in envelope, expected VoucherEnvelope
        Traceback (most recent call last):
          File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
        Exception: Failed to decrypt KFX DRM voucher with any key

        During handling of the above exception, another exception occurred:

        Traceback (most recent call last):
          File "calibre_plugins.dedrm.__init__", line 965, in KindleMobiDecrypt
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
        Exception: Failed to decrypt KFX DRM voucher with any key
        DeDRM v10.0.9: Ultimately failed to decrypt after 0.1 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md
        Running file type plugin DeDRM failed with traceback:
        Traceback (most recent call last):
          File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
          File "C:\Users\nguye\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
        Exception: Failed to decrypt KFX DRM voucher with any key

        During handling of the above exception, another exception occurred:

        Traceback (most recent call last):
          File "calibre\customize\ui.py", line 199, in _run_filetype_plugins
          File "calibre_plugins.dedrm.__init__", line 1030, in run
          File "calibre_plugins.dedrm.__init__", line 981, in KindleMobiDecrypt
        calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.9: Ultimately failed to decrypt after 0.1 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md
        InputFormatPlugin: KFX Input running
        on C:\Users\nguye\AppData\Local\Temp\calibre_8wk29u3e\66suy1_r.kfx-zip
        Software versions: KFX Input 2.15.0, calibre 7.16, Windows-10-10.0.22631-SP0
        KFX Input plugin help is available at https://www.mobileread.com/forums/showthread.php?t=291290
        Converting C:\Users\nguye\AppData\Local\Temp\calibre_8wk29u3e\66suy1_r.kfx-zip
        Processing container: B07R5CFD6J_EBOK.azw
        Traceback (most recent call last):
          File "calibre_plugins.kfx_input.__init__", line 102, in convert
          File "calibre_plugins.kfx_input.kfxlib.yj_book", line 212, in decode_book
          File "calibre_plugins.kfx_input.kfxlib.yj_book", line 321, in get_container
        calibre_plugins.kfx_input.kfxlib.utilities.KFXDRMError: Book container B07R5CFD6J_EBOK.azw has DRM and cannot be converted

        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 83, in <module>
          File "site.py", line 78, 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 1129, in run
          File "calibre\customize\conversion.py", line 245, in __call__
          File "calibre_plugins.kfx_input.__init__", line 122, in convert
        calibre.ebooks.DRMError: This book has DRM!
ElleKayEm commented 3 months ago

Stick with at least Kindle for PC 2.4.0 (aka 2.4.70904). The version you have is 2.4.1 which does not work with DeDRM.

JopTyrtle commented 3 months ago

Sorry to reopen this thread but I had assumed that it would work since I got the suggested version of Kindle and there was a .EBOK file instead of as .azw file, but it still wasn't letting me convert to a different file because of DRM. I made sure to wipe the documents of the previous Kindle version I had before installing the suggested version. (Edit: Note - Even though it was a different file format in file explorer, it still showed up as a KFX-ZIP file, don't know if that is important)

ElleKayEm commented 3 months ago

Oh, just looked at that book and realized it's a Pearson textbook. Those have the hardened encryption that these tools cannot remove even when you use the older Kindle for PC.