noDRM / DeDRM_tools

DeDRM tools for ebooks
6.57k stars 287 forks source link

Kindle for Android's KFX file encountered an error when Android key provied #472

Open jerrylin07 opened 5 months ago

jerrylin07 commented 5 months ago

Question / bug report

Greetings,

I am using:

Windows 10 Calibre 7.3 DeDRM 10.0.9 Kindle for Android and Bluestacks

the backup file generated from Kindle 4.16 (8mb) was add into plugin.

When I try to import a kfx file, I am getting:

Which version of Calibre are you running?

7.3

Which version of the DeDRM plugin are you running?

10.0.9

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

8.51.1.0

Log output

Convert book 1 of 1 (Ultimate Spider-Man (2024-) #1)
DeDRM v10.0.9: Trying to decrypt x7ax7ilw.kfx-zip
Decrypting KFX-ZIP ebook: x7ax7ilw
Got DSN key from database default_key
Found 4 keys to try after 1.0 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.2ec7faf1-b981-4b3c-a36a-2d0ff17a1125.ast
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
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 1.0 seconds
searching for kinfoFiles in C:\Users\Username\AppData\Local
Found K4PC 1.25+ kinf2018 file: C:\Users\Username\AppData\Local\Amazon\Kindle\storage\.kinf2018
Decrypted key file using IDString '2416213359' and UserName 'Username'
DeDRM v10.0.9: Found 1 new key
Decrypting KFX-ZIP ebook: x7ax7ilw
Got DSN key from database key_0
Found 1 keys to try after 1.3 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.2ec7faf1-b981-4b3c-a36a-2d0ff17a1125.ast
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\Username\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\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\Username\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\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\Username\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\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\Username\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 1.4 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\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\Username\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 187, 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 1.4 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md
Conversion options changed from defaults:
  margin_left: -1.0
  verbose: 2
  margin_bottom: -1.0
  margin_right: -1.0
  read_metadata_from_opf: 'C:\\Users\\Username\\AppData\\Local\\Temp\\calibre_nru0o7vt\\ctw8bt_8.opf'
  output_profile: 'generic_eink_hd'
  cover: 'C:\\Users\\Username\\AppData\\Local\\Temp\\calibre_nru0o7vt\\7nwjfv6l.jpeg'
  allow_conversion_with_errors: True
  margin_top: -1.0
Resolved conversion options
calibre version: 7.3.0
{'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\\Username\\AppData\\Local\\Temp\\calibre_nru0o7vt\\7nwjfv6l.jpeg',
 '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': 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 0x000001ADBF6DFB90>,
 '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': -1.0,
 'margin_left': -1.0,
 'margin_right': -1.0,
 'margin_top': -1.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.GenericEinkHD object at 0x000001ADBF6EB610>,
 'page_breaks_before': '/',
 'prefer_metadata_cover': False,
 'pretty_print': True,
 'pubdate': None,
 'publisher': None,
 'rating': None,
 'read_metadata_from_opf': 'C:\\Users\\Username\\AppData\\Local\\Temp\\calibre_nru0o7vt\\ctw8bt_8.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,
 'template_css': None,
 'template_html': None,
 'template_html_index': None,
 'timestamp': None,
 'title': None,
 'title_sort': None,
 'toc_filter': None,
 'toc_threshold': 6,
 '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 x7ax7ilw.kfx-zip
Decrypting KFX-ZIP ebook: x7ax7ilw
Got DSN key from database default_key
Found 4 keys to try after 0.0 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.2ec7faf1-b981-4b3c-a36a-2d0ff17a1125.ast
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
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.1 seconds
searching for kinfoFiles in C:\Users\Username\AppData\Local
Found K4PC 1.25+ kinf2018 file: C:\Users\Username\AppData\Local\Amazon\Kindle\storage\.kinf2018
Decrypted key file using IDString '2416213359' and UserName 'Username'
DeDRM v10.0.9: Found 1 new key
Decrypting KFX-ZIP ebook: x7ax7ilw
Got DSN key from database key_0
Found 1 keys to try after 0.3 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.2ec7faf1-b981-4b3c-a36a-2d0ff17a1125.ast
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\Username\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\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\Username\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\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\Username\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\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\Username\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.4 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\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\Username\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 187, 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.4 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\Username\AppData\Local\Temp\calibre_nru0o7vt\x7ax7ilw.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\Username\AppData\Local\Temp\calibre_nru0o7vt\x7ax7ilw.kfx-zip
Processing container: CR!0XWNZVZ6YN1EKC4V2MCK0WKX22FE.kfx
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 CR!0XWNZVZ6YN1EKC4V2MCK0WKX22FE.kfx 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 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 121, in convert
calibre.ebooks.DRMError: This book has DRM!
jerrylin07 commented 5 months ago

the sku of this book is B0CLL8484H if this help

jerrylin07 commented 5 months ago

and I can't find prc file in the folder, only amzn1.drm-voucher.v1.ast multiple CR!.kfx in the folder

ElleKayEm commented 5 months ago

Based on this discussion: https://github.com/noDRM/DeDRM_tools/discussions/440

It seems the part of the plugin that handles kfx drm isn't looking at the Kindle for Android keys. This auto_release version of the plugin has the modification talked about there which allows Kindle for Android length keys in the Kindle for PC/Mac part of DeDRM customization: https://github.com/noDRM/DeDRM_tools_autorelease/releases/tag/autorelease_bf2471e65b1f52bb5292caeba70a9aea31bf6653

So my thought is if you update to that version of the plugin, you could save the Android key you already have from the Kindle for Android keys in DeDRM's customization and import it into the Kindle for PC/Mac keys in DeDRM's customization. Very clunky but I'll be curious if it works.

On the other hand, since you're getting kfx with this method anyway, you could just download it with Kindle for PC and decrypt that copy. (You need the KFX Input plugin if you don't already have it)

jonathan2183 commented 5 months ago

just to add to that. it seems to be books from this year (2023) that dont specify available on unlimited devices. they seem to use a different drm. like Ellekay says best to use kindle for pc now if you can . or use method mentioned (it requires a rooted android device)

ElleKayEm commented 5 months ago

There are some kfx only books that use a tougher drm that even DeDRM 10.0.9 can't handle...textbooks and some others. Maybe that's the case here.

jerrylin07 commented 5 months ago

Thanks for you guys reply, I've try both method you guys mentioned, here is the logs when I use #440 method with release version of DeDrm 10.0.9

Convert book 1 of 1 (Ultimate Spider-Man (2024-) #1)
DeDRM v10.0.9: Trying to decrypt _26to6f4.kfx-zip
Decrypting KFX-ZIP ebook: _26to6f4
Got DSN key from database default_key
Got DSN key from database kindle-for-android-key
Found 5 keys to try after 0.7 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.2ec7faf1-b981-4b3c-a36a-2d0ff17a1125.ast
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
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.7 seconds
searching for kinfoFiles in C:\Users\Jerry.Lin\AppData\Local
Found K4PC 1.25+ kinf2018 file: C:\Users\Jerry.Lin\AppData\Local\Amazon\Kindle\storage\.kinf2018
Decrypted key file using IDString '2416213359' and UserName 'Jerry.Lin'
DeDRM v10.0.9: Found 1 new key
Decrypting KFX-ZIP ebook: _26to6f4
Got DSN key from database key_0
Found 1 keys to try after 0.9 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.2ec7faf1-b981-4b3c-a36a-2d0ff17a1125.ast
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\Jerry.Lin\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\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\Jerry.Lin\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\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\Jerry.Lin\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\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\Jerry.Lin\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.9 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\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\Jerry.Lin\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 187, 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.9 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md
Conversion options changed from defaults:
  margin_top: -1.0
  verbose: 2
  margin_bottom: -1.0
  margin_right: -1.0
  allow_conversion_with_errors: True
  read_metadata_from_opf: 'C:\\Users\\Jerry.Lin\\AppData\\Local\\Temp\\calibre_6sk8a2iv\\3otpq58s.opf'
  cover: 'C:\\Users\\Jerry.Lin\\AppData\\Local\\Temp\\calibre_6sk8a2iv\\yus5hgfr.jpeg'
  output_profile: 'generic_eink_hd'
  margin_left: -1.0
Resolved conversion options
calibre version: 7.3.0
{'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\\Jerry.Lin\\AppData\\Local\\Temp\\calibre_6sk8a2iv\\yus5hgfr.jpeg',
 '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': 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 0x000001A0A44DF810>,
 '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': -1.0,
 'margin_left': -1.0,
 'margin_right': -1.0,
 'margin_top': -1.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.GenericEinkHD object at 0x000001A0A44EB250>,
 'page_breaks_before': '/',
 'prefer_metadata_cover': False,
 'pretty_print': True,
 'pubdate': None,
 'publisher': None,
 'rating': None,
 'read_metadata_from_opf': 'C:\\Users\\Jerry.Lin\\AppData\\Local\\Temp\\calibre_6sk8a2iv\\3otpq58s.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,
 'template_css': None,
 'template_html': None,
 'template_html_index': None,
 'timestamp': None,
 'title': None,
 'title_sort': None,
 'toc_filter': None,
 'toc_threshold': 6,
 '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 _26to6f4.kfx-zip
Decrypting KFX-ZIP ebook: _26to6f4
Got DSN key from database default_key
Got DSN key from database kindle-for-android-key
Found 5 keys to try after 0.0 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.2ec7faf1-b981-4b3c-a36a-2d0ff17a1125.ast
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
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\Jerry.Lin\AppData\Local
Found K4PC 1.25+ kinf2018 file: C:\Users\Jerry.Lin\AppData\Local\Amazon\Kindle\storage\.kinf2018
Decrypted key file using IDString '2416213359' and UserName 'Jerry.Lin'
DeDRM v10.0.9: Found 1 new key
Decrypting KFX-ZIP ebook: _26to6f4
Got DSN key from database key_0
Found 1 keys to try after 0.3 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.2ec7faf1-b981-4b3c-a36a-2d0ff17a1125.ast
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\Jerry.Lin\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\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\Jerry.Lin\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\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\Jerry.Lin\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\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\Jerry.Lin\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.3 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\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\Jerry.Lin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\Jerry.Lin\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 187, 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.3 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\Jerry.Lin\AppData\Local\Temp\calibre_6sk8a2iv\_26to6f4.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\Jerry.Lin\AppData\Local\Temp\calibre_6sk8a2iv\_26to6f4.kfx-zip
Processing container: CR!0XWNZVZ6YN1EKC4V2MCK0WKX22FE.kfx
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 CR!0XWNZVZ6YN1EKC4V2MCK0WKX22FE.kfx 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 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 121, in convert
calibre.ebooks.DRMError: This book has DRM!

and here is the log of auto_release version DeDRM customization

Convert book 1 of 1 (Ultimate Spider-Man (2024-) #1)
DeDRM v10.0.9: Trying to decrypt rmfkylcc.kfx-zip
Decrypting KFX-ZIP ebook: rmfkylcc
Got DSN key from database default_key
Got DSN key from database kindle-for-android-key
Found 5 keys to try after 0.4 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.2ec7faf1-b981-4b3c-a36a-2d0ff17a1125.ast
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 106, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1391, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 106, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1391, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 106, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1391, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 106, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1391, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 106, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1391, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 106, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1391, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
DeDRM v10.0.9: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 937, in KindleMobiDecrypt
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 204, in GetDecryptedBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 68, in processBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 112, in decrypt_voucher
Exception: 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\Username\AppData\Local
Found K4PC 1.25+ kinf2018 file: C:\Users\Username\AppData\Local\Amazon\Kindle\storage\.kinf2018
Decrypted key file using IDString '2416213359' and UserName 'Username'
DeDRM v10.0.9: Found 1 new key
Decrypting KFX-ZIP ebook: rmfkylcc
Got DSN key from database key_0
Found 1 keys to try after 0.6 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.2ec7faf1-b981-4b3c-a36a-2d0ff17a1125.ast
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 937, in KindleMobiDecrypt
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 204, in GetDecryptedBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 68, in processBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 112, 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\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 106, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1391, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 937, in KindleMobiDecrypt
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 204, in GetDecryptedBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 68, in processBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 112, 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\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 106, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1391, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 937, in KindleMobiDecrypt
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 204, in GetDecryptedBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 68, in processBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 112, 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 974, in KindleMobiDecrypt
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 204, in GetDecryptedBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 68, in processBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 112, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key
DeDRM v10.0.9: Ultimately failed to decrypt after 0.7 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 937, in KindleMobiDecrypt
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 204, in GetDecryptedBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 68, in processBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 112, 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 187, in _run_filetype_plugins
  File "calibre_plugins.dedrm.__init__", line 1039, in run
  File "calibre_plugins.dedrm.__init__", line 990, in KindleMobiDecrypt
calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.9: Ultimately failed to decrypt after 0.7 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md
Conversion options changed from defaults:
  margin_right: -1.0
  margin_bottom: -1.0
  output_profile: 'generic_eink_hd'
  read_metadata_from_opf: 'C:\\Users\\Username\\AppData\\Local\\Temp\\calibre_l8xwgef4\\h0hepi16.opf'
  cover: 'C:\\Users\\Username\\AppData\\Local\\Temp\\calibre_l8xwgef4\\x6mev4v9.jpeg'
  margin_left: -1.0
  margin_top: -1.0
  allow_conversion_with_errors: True
  verbose: 2
Resolved conversion options
calibre version: 7.3.0
{'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\\Username\\AppData\\Local\\Temp\\calibre_l8xwgef4\\x6mev4v9.jpeg',
 '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': 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 0x000001DDB95D2F50>,
 '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': -1.0,
 'margin_left': -1.0,
 'margin_right': -1.0,
 'margin_top': -1.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.GenericEinkHD object at 0x000001DDB95E6A10>,
 'page_breaks_before': '/',
 'prefer_metadata_cover': False,
 'pretty_print': True,
 'pubdate': None,
 'publisher': None,
 'rating': None,
 'read_metadata_from_opf': 'C:\\Users\\Username\\AppData\\Local\\Temp\\calibre_l8xwgef4\\h0hepi16.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,
 'template_css': None,
 'template_html': None,
 'template_html_index': None,
 'timestamp': None,
 'title': None,
 'title_sort': None,
 'toc_filter': None,
 'toc_threshold': 6,
 '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 rmfkylcc.kfx-zip
Decrypting KFX-ZIP ebook: rmfkylcc
Got DSN key from database default_key
Got DSN key from database kindle-for-android-key
Found 5 keys to try after 0.0 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.2ec7faf1-b981-4b3c-a36a-2d0ff17a1125.ast
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 106, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1391, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 106, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1391, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 106, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1391, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 106, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1391, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 106, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1391, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 106, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1391, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
DeDRM v10.0.9: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 937, in KindleMobiDecrypt
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 204, in GetDecryptedBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 68, in processBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 112, in decrypt_voucher
Exception: 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\Username\AppData\Local
Found K4PC 1.25+ kinf2018 file: C:\Users\Username\AppData\Local\Amazon\Kindle\storage\.kinf2018
Decrypted key file using IDString '2416213359' and UserName 'Username'
DeDRM v10.0.9: Found 1 new key
Decrypting KFX-ZIP ebook: rmfkylcc
Got DSN key from database key_0
Found 1 keys to try after 0.2 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.2ec7faf1-b981-4b3c-a36a-2d0ff17a1125.ast
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 937, in KindleMobiDecrypt
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 204, in GetDecryptedBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 68, in processBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 112, 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\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 106, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1391, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Decryption failed, trying next fallback 
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 937, in KindleMobiDecrypt
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 204, in GetDecryptedBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 68, in processBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 112, 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\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 106, in decrypt_voucher
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1391, in decryptvoucher
UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 937, in KindleMobiDecrypt
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 204, in GetDecryptedBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 68, in processBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 112, 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 974, in KindleMobiDecrypt
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 204, in GetDecryptedBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 68, in processBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 112, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key
DeDRM v10.0.9: Ultimately failed to decrypt after 0.3 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 937, in KindleMobiDecrypt
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 204, in GetDecryptedBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 68, in processBook
  File "C:\Users\Username\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 112, 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 187, in _run_filetype_plugins
  File "calibre_plugins.dedrm.__init__", line 1039, in run
  File "calibre_plugins.dedrm.__init__", line 990, in KindleMobiDecrypt
calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.9: Ultimately failed to decrypt after 0.3 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\Username\AppData\Local\Temp\calibre_l8xwgef4\rmfkylcc.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\Username\AppData\Local\Temp\calibre_l8xwgef4\rmfkylcc.kfx-zip
Processing container: CR!0XWNZVZ6YN1EKC4V2MCK0WKX22FE.kfx
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 CR!0XWNZVZ6YN1EKC4V2MCK0WKX22FE.kfx 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 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 121, in convert
calibre.ebooks.DRMError: This book has DRM!

It's a book distributed by comixology, so I guess that's the tougher drm you mentioned ps. As for why I trying to get Android copy, because they only distribute the SD res version in the pc and the old app with the file suffix prc, and in the new app they distribute the HD res without the prc file, and the difference in the size of the kfx in the folder between the two is noticeable

ElleKayEm commented 5 months ago

Actually comics didn't even come in kfx format at all for a long time (at least with Kindle for PC) so I don't know. No idea if this will help in this case (haven't used it myself) but here is something that can get higher res images if available on files from Kindle for PC: https://www.mobileread.com/forums/showthread.php?t=343768