Error using dedrm on kfx-zip files. I am using the mthod of physically plugging in my kindle and then adding books to my library. The process has worked for books I previously sent to amazon and they added their files too but not to any newer book purchases. Here is what I got from debug mode.
Paste log output here.
```ApplicationPaletteChange event ignored
Using calibre Qt style: True
calibre_plugins.k2pdfopt_plugin.pdf:105: SyntaxWarning: "\?" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\?"? A raw string is also an option.
calibre_plugins.k2pdfopt_plugin.constants:125: SyntaxWarning: "\?" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\?"? A raw string is also an option.
EpubMerge: DEBUG: 2026-06-29 10:24:24,605: calibre_plugins.epubmerge.epubmerge_plugin(156): macmenuhack file_path:C:\Users\hunte\AppData\Roaming\calibre\plugins\fanficfare_macmenuhack.txt
calibre Debug log
calibre 9.9 embedded-python: True
Windows-10-10.0.19045-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19045')
Python 3.14.5
Windows: ('10', '10.0.19045', '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, 33, 0) && DeDRM (10, 0, 9) && Package KFX (from KFX Input) (2, 33, 0) && Book List Plus (2, 0, 1) && EpubMerge (3, 2, 0) && Find Duplicates (1, 10, 10) && Goodreads (1, 8, 5) && K2pdfopt Plugin (0, 5, 5) && KFX metadata reader (from KFX Input) (2, 33, 0) && From KFX (2, 33, 0) && KFX Input (2, 33, 0) && KindleUnpack - The Plugin (0, 84, 0) && Modify ePub (1, 8, 9)
calibre 9.9 embedded-python: True
Windows-10-10.0.19045-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19045')
Python 3.14.5
Windows: ('10', '10.0.19045', '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, 33, 0) && DeDRM (10, 0, 9) && Package KFX (from KFX Input) (2, 33, 0) && Book List Plus (2, 0, 1) && EpubMerge (3, 2, 0) && Find Duplicates (1, 10, 10) && Goodreads (1, 8, 5) && K2pdfopt Plugin (0, 5, 5) && KFX metadata reader (from KFX Input) (2, 33, 0) && From KFX (2, 33, 0) && KFX Input (2, 33, 0) && KindleUnpack - The Plugin (0, 84, 0) && Modify ePub (1, 8, 9)
QPA platform: windows
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 108.37333333333332 x 107.5764705882353
[0.00] Starting up...
[0.00] Showing splash screen...
[1.15] splash screen shown
[1.16] Initializing db...
[1.19] db initialized
[1.19] Constructing main UI...
KindleUnpack is using the bundled imghdr module
Loaded cached store plugin for: Project Gutenberg at version: 10
[2.60] GUI main window shown
[2.65] main UI initialized...
[2.65] Hiding splash screen
[2.65] splash screen hidden
[2.65] Started up in 2.65 seconds with 153 books
Gather KFX-ZIP (from KFX Input) 2.33.0: Importing F:\documents\Downloads\Items01\A Resistance History of the United States_B0FPKHFZWG.kfx
Gather KFX-ZIP (from KFX Input): Gathered 5 file(s) as C:\Users\hunte\AppData\Local\Temp\calibre-ahw6kxmy\k8vgewz_.kfx-zip
DeDRM v10.0.9: Trying to decrypt k8vgewz_.kfx-zip
Storage number map:
{(7, 0): [(2, 'E')], (7, 1): [(3, 'C')], (7, 2): [(1, 'D')], (7, 3): [(1, 'F')]}
Storage number for USBSTOR\DISK&VEN_KINDLE&PROD_INTERNAL_STORAGE&REV_0409\G092AP0323730C46&0: StorageDeviceNumber(type=7, number=3, partition_number=0)
Drive letters for USBDevice(vendor_id=0x1949 product_id=0x324 bcd=0x409 devid=usb\vid_1949&pid_0324&rev_0409 devinst=14)
{'drive_letters': ['F'],
'pnp_id_map': {'F': '\\\\?\\usbstor#disk&ven_kindle&prod_internal_storage&rev_0409#g092ap0323730c46&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}'},
'readonly_drives': set(),
'sort_map': {'F': (3, 1)}}
Syncing cover thumbnails to workaround amazon cover bug
Restored 0 cover thumbnails that were destroyed by Amazon
Job: 0 Get device information started
DeviceJob: 0 Get device information done, calling callback
DeviceJob: 0 Get device information callback returned
Job: 1 Set library information started
DeviceJob: 1 Set library information done, calling callback
DeviceJob: 1 Set library information callback returned
Job: 2 Get list of books on device started
DEBUG: 0.0 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= None
DEBUG: 0.0 USBMS: dirs are: F:\ documents
DEBUG: 0.0 USBMS: scan from root False F:\documents
DEBUG: 0.0 USBMS: count found in cache: 53, count of files in metadata: 53, need_sync: False
DEBUG: 0.0 USBMS: Finished fetching list of books from device. oncard= None
DEBUG: 0.0 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= carda
DEBUG: 0.0 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= cardb
DeviceJob: 2 Get list of books on device done, calling callback
DEBUG: 0.0 DeviceJob: metadata_downloaded: Starting set_books_in_library
DEBUG: 0.0 DeviceJob: set_books_in_library: books to process= 53
DEBUG: 0.1 DeviceJob: set_books_in_library finished: time= 0.0046002864837646484
DEBUG: 0.1 DeviceJob: metadata_downloaded: updating views
DEBUG: 0.1 DeviceJob: metadata_downloaded: syncing
DEBUG: 0.1 DeviceJob: metadata_downloaded: refreshing ondevice
DEBUG: 0.1 DeviceJob: metadata_downloaded: sending metadata_available signal
DeviceJob: 2 Get list of books on device callback returned
Job: 0 Get device information finished
No details available.
Job: 2 Get list of books on device finished
No details available.
Job: 1 Set library information finished
No details available.
Job: 3 Prepare files for transfer from device started
DeviceJob: 3 Prepare files for transfer from device done, calling callback
DeviceJob: 3 Prepare files for transfer from device callback returned
Job: 3 Prepare files for transfer from device finished
No details available.
Decrypting KFX-ZIP ebook: k8vgewz_
Found 1 keys to try after 0.6 seconds
Decrypting KFX DRM voucher: voucher
Traceback (most recent call last):
File "C:\Users\hunte\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
File "C:\Users\hunte\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
File "C:\Users\hunte\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\hunte\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
File "C:\Users\hunte\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
File "C:\Users\hunte\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.6 seconds
searching for kinfoFiles in C:\Users\hunte\AppData\Local
No K4PC kindle.info/kinf/kinf2011 files have been found.
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 931, in KindleMobiDecrypt
File "C:\Users\hunte\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
File "C:\Users\hunte\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
File "C:\Users\hunte\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 236, 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.7 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md
Package KFX (from KFX Input) 2.33.0: Packaging C:\Users\hunte\AppData\Local\Temp\calibre-ahw6kxmy\k8vgewz_.kfx-zip
Processing container: A Resistance History of the United States_B0FPKHFZWG.kfx
Running file type plugin Package KFX (from KFX Input) failed with traceback:
Traceback (most recent call last):
File "calibre\customize\ui.py", line 236, 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 215, in decode_book
File "calibre_plugins.kfx_input.kfxlib.yj_book", line 339, in get_container
calibre_plugins.kfx_input.kfxlib.utilities.KFXDRMError: Book container A Resistance History of the United States_B0FPKHFZWG.kfx has DRM and cannot be converted
KFX metadata reader (from KFX Input) activated for C:\Users\hunte\AppData\Local\Temp\calibre-ahw6kxmy\ee5kr72t_add_books\0\A Resistance History of the United States_B0FPKHFZWG.kfx-zip
Failed to count pages in book: 176 KFX-ZIP because it is DRM locked
Added A Resistance History of the United States to db in: 0.0
Added 1 books in 1.6 seconds
DEBUG: 35.9 DeviceJob: set_books_in_library: books to process= 53
DEBUG: 35.9 DeviceJob: set_books_in_library finished: time= 0.008289575576782227
Worker Launch took: 0.01 seconds
Job: 4 Convert book 1 of 1 (A Resistance History of the United States) finished
Convert book 1 of 1 (A Resistance History of the United States)
DeDRM v10.0.9: Trying to decrypt 3g2bzv7h.kfx-zip
Decrypting KFX-ZIP ebook: 3g2bzv7h
Found 1 keys to try after 0.7 seconds
Decrypting KFX DRM voucher: voucher
Traceback (most recent call last):
File "C:\Users\hunte\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
File "C:\Users\hunte\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
File "C:\Users\hunte\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\hunte\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
File "C:\Users\hunte\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
File "C:\Users\hunte\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.7 seconds
searching for kinfoFiles in C:\Users\hunte\AppData\Local
No K4PC kindle.info/kinf/kinf2011 files have been found.
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 931, in KindleMobiDecrypt
File "C:\Users\hunte\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
File "C:\Users\hunte\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
File "C:\Users\hunte\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 236, 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.7 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md
Conversion options changed from defaults:
output_profile: 'kindle_pw3'
cover: 'C:\\Users\\hunte\\AppData\\Local\\Temp\\calibre-ahw6kxmy\\_ye_gjy0.jpeg'
read_metadata_from_opf: 'C:\\Users\\hunte\\AppData\\Local\\Temp\\calibre-ahw6kxmy\\hc25mk57.opf'
verbose: 2
Resolved conversion options
calibre version: 9.9.0
{'add_alt_text_to_img': False,
'allow_conversion_with_errors': False,
'asciiize': False,
'author_sort': None,
'authors': None,
'base_font_size': 0.0,
'book_producer': None,
'change_justification': 'original',
'chapter': "//*[((name()='h1' or name()='h2') and re:test(., "
"'\\s*((chapter|book|section|part)\\s+)|((prolog|prologue|epilogue)(\\s+|$))', "
"'i')) or @class = 'chapter']",
'chapter_mark': 'pagebreak',
'comments': None,
'cover': 'C:\\Users\\hunte\\AppData\\Local\\Temp\\calibre-ahw6kxmy\\_ye_gjy0.jpeg',
'debug_pipeline': None,
'dehyphenate': True,
'delete_blank_paragraphs': True,
'disable_font_rescaling': False,
'dont_split_on_page_breaks': False,
'duplicate_links_in_toc': False,
'embed_all_fonts': False,
'embed_font_family': None,
'enable_heuristics': False,
'epub_flatten': False,
'epub_inline_toc': False,
'epub_max_image_size': 'none',
'epub_toc_at_end': False,
'epub_version': '2',
'expand_css': False,
'extra_css': None,
'extract_to': None,
'filter_css': '',
'fix_indents': True,
'flow_size': 260,
'font_size_mapping': None,
'format_scene_breaks': True,
'html_unwrap_factor': 0.4,
'input_encoding': None,
'input_profile': <calibre.customize.profiles.InputProfile object at 0x0000019C8D448EC0>,
'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_default_epub_cover': False,
'no_inline_navbars': False,
'no_svg_cover': False,
'output_profile': <calibre.customize.profiles.KindlePaperWhite3Output object at 0x0000019C8D44B8C0>,
'page_breaks_before': '/',
'prefer_metadata_cover': False,
'preserve_cover_aspect_ratio': False,
'pretty_print': True,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': 'C:\\Users\\hunte\\AppData\\Local\\Temp\\calibre-ahw6kxmy\\hc25mk57.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': '[]',
'unsmarten_punctuation': False,
'unwrap_lines': True,
'use_auto_toc': False,
'verbose': 2}
DeDRM v10.0.9: Trying to decrypt 3g2bzv7h.kfx-zip
Decrypting KFX-ZIP ebook: 3g2bzv7h
Found 1 keys to try after 0.0 seconds
Decrypting KFX DRM voucher: voucher
Traceback (most recent call last):
File "C:\Users\hunte\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
File "C:\Users\hunte\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
File "C:\Users\hunte\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\hunte\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
File "C:\Users\hunte\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
File "C:\Users\hunte\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\hunte\AppData\Local
No K4PC kindle.info/kinf/kinf2011 files have been found.
DeDRM v10.0.9: Ultimately failed to decrypt after 0.0 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\hunte\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
File "C:\Users\hunte\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
File "C:\Users\hunte\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 236, 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.0 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\hunte\AppData\Local\Temp\calibre-ahw6kxmy\3g2bzv7h.kfx-zip
Software versions: KFX Input 2.33.0, calibre 9.9, 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\hunte\AppData\Local\Temp\calibre-ahw6kxmy\3g2bzv7h.kfx-zip
Processing container: A Resistance History of the United States_B0FPKHFZWG.kfx
Traceback (most recent call last):
File "calibre_plugins.kfx_input.__init__", line 96, in convert
File "calibre_plugins.kfx_input.kfxlib.yj_book", line 215, in decode_book
File "calibre_plugins.kfx_input.kfxlib.yj_book", line 339, in get_container
calibre_plugins.kfx_input.kfxlib.utilities.KFXDRMError: Book container A Resistance History of the United States_B0FPKHFZWG.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 203, 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 214, in main
File "calibre\gui2\convert\gui_conversion.py", line 39, in gui_convert_override
File "calibre\gui2\convert\gui_conversion.py", line 26, in gui_convert
File "calibre\ebooks\conversion\plumber.py", line 1087, in run
File "calibre\customize\conversion.py", line 241, in __call__
File "calibre_plugins.kfx_input.__init__", line 117, in convert
calibre.ebooks.DRMError: This book has DRM!
[67.38] Shutdown starting...
[67.44] Shutdown message shown...
[67.44] Grid view shutdown
[67.44] Bookshelf view shutdown
[67.44] Actions shutdown
[67.64] Various services shutdown
[67.64] Metadata backup shutdown
[67.74] Current database closed
[67.75] Windows hidden
[67.77] Waiting for overseers, mdns, and live to shutdown
[67.77] Waiting for device manager to shutdown
[67.77] Shutdown complete in 0.39, quitting...
Question / bug report
Error using dedrm on kfx-zip files. I am using the mthod of physically plugging in my kindle and then adding books to my library. The process has worked for books I previously sent to amazon and they added their files too but not to any newer book purchases. Here is what I got from debug mode.
Which version of Calibre are you running?
9.10
Which version of the DeDRM plugin are you running?
v10.0.9
If applicable, which version of the Kindle software are you running?
No response
Log output