Skip to content

DeDRM Conversion issue KFX-ZIP #992

@Kaetrin

Description

@Kaetrin

Question / bug report

Up until recently I've been able to import books into my Paperwhite 7 and convert them from KFX format, as long as they were completely downloaded to the device before I imported. Tonight, the 4 books I tried would only come in as KFX-ZIP files. I've deleted and redownloaded, updated Calibre and the plugins, checked I have the latest proven version of the deDRM tools and I keep getting the same result. I saw on MobileReads that there may have been a recent change in the firmware which made the deDRM tools not work but my firmware is 5.16.2.1.1 and my understanding is that Amazon could not have changed things without updating it? Any suggestions or advice welcome. Thank you in advance.

Which version of Calibre are you running?

9.7

Which version of the DeDRM plugin are you running?

v10.0.3

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

5.16.2.1.1

Log output

ApplicationPaletteChange event ignored
Using calibre Qt style: True
ApplicationPaletteChange event received
calibre Debug log
calibre 9.7  embedded-python: True
Windows-11-10.0.26200-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '11', '10.0.26200')
Python 3.14.2
Windows: ('11', '10.0.26200', '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, 30, 0) && DeDRM (10, 0, 9) && Package KFX (from KFX Input) (2, 30, 0) && KFX metadata reader (from KFX Input) (2, 30, 0) && From KFX (2, 30, 0) && KFX Input (2, 30, 0) && Set KFX metadata (from KFX Output) (2, 19, 0) && KFX Output (2, 19, 0) && KindleUnpack - The Plugin (0, 83, 8)
calibre 9.7  embedded-python: True
Windows-11-10.0.26200-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '11', '10.0.26200')
Python 3.14.2
Windows: ('11', '10.0.26200', '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, 30, 0) && DeDRM (10, 0, 9) && Package KFX (from KFX Input) (2, 30, 0) && KFX metadata reader (from KFX Input) (2, 30, 0) && From KFX (2, 30, 0) && KFX Input (2, 30, 0) && Set KFX metadata (from KFX Output) (2, 19, 0) && KFX Output (2, 19, 0) && KindleUnpack - The Plugin (0, 83, 8)
QPA platform: windows
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 69.76824034334764 x 69.80152671755725
[0.00] Starting up...
[0.00] Showing splash screen...
[1.16] splash screen shown
[1.16] Initializing db...
[2.03] db initialized
[2.03] Constructing main UI...
[2.97] GUI main window shown
[3.00] main UI initialized...
[3.00] Hiding splash screen
[3.00] splash screen hidden
[3.00] Started up in 3.00 seconds with 9186 books
Gather KFX-ZIP (from KFX Input) 2.30.0: Importing F:\documents\Problematic Summer Romance_ From the bestselling author of Deep End and The Love Hypothesis_B0DZBZ86Y8.kfx
Gather KFX-ZIP (from KFX Input): Gathered 5 file(s) as C:\Users\User\AppData\Local\Temp\calibre-uahy4n21\sev4frez.kfx-zip
DeDRM v10.0.9: Trying to decrypt sev4frez.kfx-zip
Decrypting KFX-ZIP ebook: sev4frez
Got DSN key from database default_key
Got DSN key from database default_key_2
Found 5 keys to try after 0.3 seconds
Decrypting KFX DRM voucher: voucher
Traceback (most recent call last):
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1416, in parse
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 124, in _assert
Exception: Unknown type encountered in envelope, expected VoucherEnvelope
Traceback (most recent call last):
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1416, in parse
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 124, in _assert
Exception: Unknown type encountered in envelope, expected VoucherEnvelope
Traceback (most recent call last):
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1416, in parse
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 124, in _assert
Exception: Unknown type encountered in envelope, expected VoucherEnvelope
Traceback (most recent call last):
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1416, in parse
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 124, in _assert
Exception: Unknown type encountered in envelope, expected VoucherEnvelope
Traceback (most recent call last):
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1416, in parse
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 124, in _assert
Exception: Unknown type encountered in envelope, expected VoucherEnvelope
Traceback (most recent call last):
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1416, in parse
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 124, 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
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 950, in KindleMobiDecrypt
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 204, in GetDecryptedBook
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 68, in processBook
  File "C:\Users\User\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.3 seconds
searching for kinfoFiles in C:\Users\User\AppData\Local
Found K4PC 1.25+ kinf2018 file: C:\Users\User\AppData\Local\Amazon\Kindle\storage\.kinf2018
Found K4PC 1.9+ kinf2011 file: C:\Users\User\AppData\Local\Amazon\Kindle\storage\.kinf2011
Decrypted key file using IDString '4074373209' and UserName 'User'
Decrypted key file using IDString '4074373209' and UserName 'User'
DeDRM v10.0.9: Found 1 new key
Decrypting KFX-ZIP ebook: sev4frez
Got DSN key from database key_1
Found 1 keys to try after 0.4 seconds
Decrypting KFX DRM voucher: voucher
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 950, in KindleMobiDecrypt
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 204, in GetDecryptedBook
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 68, in processBook
  File "C:\Users\User\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\User\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1416, in parse
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 124, in _assert
Exception: Unknown type encountered in envelope, expected VoucherEnvelope
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 950, in KindleMobiDecrypt
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 204, in GetDecryptedBook
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 68, in processBook
  File "C:\Users\User\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\User\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1416, in parse
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 124, in _assert
Exception: Unknown type encountered in envelope, expected VoucherEnvelope
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 950, in KindleMobiDecrypt
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 204, in GetDecryptedBook
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 68, in processBook
  File "C:\Users\User\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 987, in KindleMobiDecrypt
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 204, in GetDecryptedBook
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 68, in processBook
  File "C:\Users\User\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.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 950, in KindleMobiDecrypt
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 204, in GetDecryptedBook
  File "C:\Users\User\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 68, in processBook
  File "C:\Users\User\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 236, in _run_filetype_plugins
  File "calibre_plugins.dedrm.__init__", line 1052, in run
  File "calibre_plugins.dedrm.__init__", line 1003, 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
Package KFX (from KFX Input) 2.30.0: Packaging C:\Users\User\AppData\Local\Temp\calibre-uahy4n21\sev4frez.kfx-zip
Processing container: CR!128QW7K7SD6F399TE15XW8HAZW9H.kfx
Processing container: CR!ET4RS2TDT51KZ2VKAX7DN4FTYCKN.kfx
Processing container: Problematic Summer Romance_ From the bestselling author of Deep End and The Love Hypothesis_B0DZBZ86Y8.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 213, in decode_book
  File "calibre_plugins.kfx_input.kfxlib.yj_book", line 331, in get_container
calibre_plugins.kfx_input.kfxlib.utilities.KFXDRMError: Book container Problematic Summer Romance_ From the bestselling author of Deep End and The Love Hypothesis_B0DZBZ86Y8.kfx has DRM and cannot be converted
KFX metadata reader (from KFX Input) activated for C:\Users\User\AppData\Local\Temp\calibre-uahy4n21\lrxj_f3r_add_books\0\Problematic Summer Romance_ From the bestselling author of Deep End and The Love Hypothesis_B0DZBZ86Y8.kfx-zip
Storage number map:
{(7, 0): [(2, 'E')], (7, 1): [(3, 'C')], (7, 2): [(2, 'D')], (7, 3): [(1, 'F')]}
Storage number for USBSTOR\DISK&VEN_KINDLE&PROD_INTERNAL_STORAGE&REV_0100\G090G105726600VB&0: StorageDeviceNumber(type=7, number=3, partition_number=0)
Drive letters for USBDevice(vendor_id=0x1949 product_id=0x4 bcd=0x100 devid=usb\vid_1949&pid_0004&rev_0100 devinst=5)
{'drive_letters': ['F'],
 'pnp_id_map': {'F': '\\\\?\\usbstor#disk&ven_kindle&prod_internal_storage&rev_0100#g090g105726600vb&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}'},
 'readonly_drives': set(),
 'sort_map': {'F': (3, 1)}}
Syncing cover thumbnails to workaround amazon cover bug
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: 62, count of files in metadata: 62, 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.2 DeviceJob: set_books_in_library: books to process= 62
DEBUG:    0.2 DeviceJob: set_books_in_library finished: time= 0.0029296875
DEBUG:    0.2 DeviceJob: metadata_downloaded: updating views
DEBUG:    0.2 DeviceJob: metadata_downloaded: syncing
DEBUG:    0.2 DeviceJob: metadata_downloaded: refreshing ondevice
DEBUG:    0.2 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.
Added Problematic Summer Romance: From the bestselling author of Deep End and The Love Hypothesis to db in: 2.1
Failed to count pages in book: 9489 KFX-ZIP because it is DRM locked
Added 1 books in 3.2 seconds
DEBUG:   38.0 DeviceJob: set_books_in_library: books to process= 62
DEBUG:   38.0 DeviceJob: set_books_in_library finished: time= 0.009088516235351562
[65.62] Shutdown starting...
[65.65] Shutdown message shown...
[65.65] Grid view shutdown
[65.65] Bookshelf view shutdown
[65.65] Actions shutdown
[65.86] Various services shutdown
[65.86] Metadata backup shutdown
[65.93] Current database closed
[65.94] Windows hidden
[65.96] Waiting for overseers, mdns, and live to shutdown
[65.96] Waiting for device manager to shutdown
[65.96] Shutdown complete in 0.34, quitting...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions