noDRM / DeDRM_tools

DeDRM tools for ebooks
6.56k stars 287 forks source link

Can't remove DRM from KFX, importing as KFX-ZIP. Added serial number to KFX Input, deDRM fails to find key. #520

Open WPTK opened 3 months ago

WPTK commented 3 months ago

Question / bug report

No response

Which version of Calibre are you running?

7.7.0

Which version of the DeDRM plugin are you running?

10.0.3

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

Kindle Paperwhite OS 5.16.7

Log output

Gather KFX-ZIP (from KFX Input) 2.9.0: Importing C:\Users\BK\Desktop\KFX Output Test\1Q84 (Vintage International)_B004LROUW2.kfx
Gather KFX-ZIP (from KFX Input): Cannot locate some files needed for the book. KFX files must remain in their original folder structure for successful import. 
Gather KFX-ZIP (from KFX Input): Gathered 1 file(s) as C:\Users\BK\AppData\Local\Temp\calibre_fkffftue\mv0sqy8s.kfx-zip
DeDRM v10.0.3: Trying to decrypt mv0sqy8s.kfx-zip
Using Library AlfCrypto DLL/DYLIB/SO
Decrypting KFX-ZIP ebook: mv0sqy8s
Found 1 keys to try after 0.1 seconds
DeDRM v10.0.3: Failed to decrypt with error: The .kfx-zip archive contains an encrypted DRMION file without a DRM voucher
DeDRM v10.0.3: Looking for new default Kindle Key after 0.1 seconds
searching for kinfoFiles in C:\Users\BK\AppData\Local
Found K4PC 1.25+ kinf2018 file: C:\Users\BK\AppData\Local\Amazon\Kindle\storage\.kinf2018
Decrypted key file using IDString '4108948878' and UserName 'BK'
DeDRM v10.0.3: Found 1 new key
Decrypting KFX-ZIP ebook: mv0sqy8s
Got DSN key from database key_0
Found 1 keys to try after 0.2 seconds
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 957, in KindleMobiDecrypt
  File "C:\Users\BK\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 261, in GetDecryptedBook
  File "C:\Users\BK\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\BK\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 88, in decrypt_voucher
Exception: The .kfx-zip archive contains an encrypted DRMION file without a DRM voucher

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 991, in KindleMobiDecrypt
  File "C:\Users\BK\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 261, in GetDecryptedBook
  File "C:\Users\BK\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\BK\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 88, in decrypt_voucher
Exception: The .kfx-zip archive contains an encrypted DRMION file without a DRM voucher
DeDRM v10.0.3: 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 957, in KindleMobiDecrypt
  File "C:\Users\BK\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 261, in GetDecryptedBook
  File "C:\Users\BK\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\BK\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 88, in decrypt_voucher
Exception: The .kfx-zip archive contains an encrypted DRMION file without a DRM voucher

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 1056, in run
  File "calibre_plugins.dedrm.__init__", line 1007, in KindleMobiDecrypt
calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.3: 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
Package KFX (from KFX Input) 2.9.0: Packaging C:\Users\BK\AppData\Local\Temp\calibre_fkffftue\mv0sqy8s.kfx-zip
Processing container: 1Q84 (Vintage International)_B004LROUW2.kfx
Running file type plugin Package KFX (from KFX Input) failed with traceback:
Traceback (most recent call last):
  File "calibre\customize\ui.py", line 187, in _run_filetype_plugins
  File "calibre_plugins.kfx_input.package_filetype", line 23, in run
  File "calibre_plugins.kfx_input.package_filetype", line 34, in package_kfx
  File "calibre_plugins.kfx_input.kfxlib.yj_book", line 79, in convert_to_single_kfx
  File "calibre_plugins.kfx_input.kfxlib.yj_book", line 212, in decode_book
  File "calibre_plugins.kfx_input.kfxlib.yj_book", line 321, in get_container
calibre_plugins.kfx_input.kfxlib.utilities.KFXDRMError: Book container 1Q84 (Vintage International)_B004LROUW2.kfx has DRM and cannot be converted
KFX metadata reader (from KFX Input) activated for C:\Users\BK\AppData\Local\Temp\calibre_fkffftue\9fxiwlm__add_books\0\1Q84 (Vintage International)_B004LROUW2.kfx-zip
Traceback (most recent call last):
  File "calibre\customize\ui.py", line 469, in get_file_type_metadata
  File "calibre_plugins.kfx_input.metadata_reader", line 28, in get_metadata
  File "calibre_plugins.kfx_input.kfxlib.yj_book", line 150, in get_metadata
Exception: Failed to locate a KFX container with metadata
[8.22] splash screen hidden
[8.22] Started up in 8.22 seconds with 0 books
stdout+stderr from file dialog helper: [b'', b'']
piped data from file dialog helper: [b'\x86\xb82}v<\xc3\xc3\xce\x92:\x1f\x80\xc3N\x0b(\xb6\x03R\xb4g\xd0\x8c"\xac\xcc\xf8\xa2L\xc5\xf7', b'C:\\Users\\BK\\Desktop\\KFX Output Test\\1Q84 (Vintage International)_B004LROUW2.kfx']
Added 1Q84 (Vintage International) B004LROUW2 to db in: 0.1
Added 1 books in 1.0 seconds
WPTK commented 3 months ago

Additional info: Just downloaded 10.0.9 and the same issues occurs:

`[7.50] Started up in 7.50 seconds with 0 books stdout+stderr from file dialog helper: [b'', b''] piped data from file dialog helper: [b'}\xf8\x90\xb5_\xd3\xf2\x80p?\x13\x01\xf0\x8e~zm\xcb\xfcH\xdf\x95\xe9\xaa\x9eF.\x7f\x14Y\xc1{', b'C:\Users\BK\Desktop\KFX Output Test\1Q84 (Vintage International)_B004LROUW2.kfx'] Decrypting KFX-ZIP ebook: dyo47nsr Found 1 keys to try after 0.6 seconds DeDRM v10.0.9: Failed to decrypt with error: The .kfx-zip archive contains an encrypted DRMION file without a DRM voucher DeDRM v10.0.9: Looking for new default Kindle Key after 0.6 seconds searching for kinfoFiles in C:\Users\BK\AppData\Local Found K4PC 1.25+ kinf2018 file: C:\Users\BK\AppData\Local\Amazon\Kindle\storage.kinf2018 Decrypted key file using IDString '4108948878' and UserName 'BK' DeDRM v10.0.9: Found 1 new key Decrypting KFX-ZIP ebook: dyo47nsr Got DSN key from database key_0 Found 1 keys to try after 0.7 seconds Traceback (most recent call last): File "calibre_plugins.dedrm.init", line 931, in KindleMobiDecrypt File "C:\Users\BK\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook File "C:\Users\BK\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook File "C:\Users\BK\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 88, in decrypt_voucher Exception: The .kfx-zip archive contains an encrypted DRMION file without a DRM voucher

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\BK\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook File "C:\Users\BK\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook File "C:\Users\BK\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 88, in decrypt_voucher Exception: The .kfx-zip archive contains an encrypted DRMION file without a DRM voucher 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\BK\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook File "C:\Users\BK\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook File "C:\Users\BK\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 88, in decrypt_voucher Exception: The .kfx-zip archive contains an encrypted DRMION file without a DRM voucher

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.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.9.0: Packaging C:\Users\BK\AppData\Local\Temp\calibre_nxeoyggr\dyo47nsr.kfx-zip Processing container: 1Q84 (Vintage International)_B004LROUW2.kfx Running file type plugin Package KFX (from KFX Input) failed with traceback: Traceback (most recent call last): File "calibre\customize\ui.py", line 187, in _run_filetype_plugins File "calibre_plugins.kfx_input.package_filetype", line 23, in run File "calibre_plugins.kfx_input.package_filetype", line 34, in package_kfx File "calibre_plugins.kfx_input.kfxlib.yj_book", line 79, in convert_to_single_kfx File "calibre_plugins.kfx_input.kfxlib.yj_book", line 212, in decode_book File "calibre_plugins.kfx_input.kfxlib.yj_book", line 321, in get_container calibre_plugins.kfx_input.kfxlib.utilities.KFXDRMError: Book container 1Q84 (Vintage International)_B004LROUW2.kfx has DRM and cannot be converted KFX metadata reader (from KFX Input) activated for C:\Users\BK\AppData\Local\Temp\calibre_nxeoyggr\vg0iid06_add_books\0\1Q84 (Vintage International)_B004LROUW2.kfx-zip Traceback (most recent call last): File "calibre\customize\ui.py", line 469, in get_file_type_metadata File "calibre_plugins.kfx_input.metadata_reader", line 28, in get_metadata File "calibre_plugins.kfx_input.kfxlib.yj_book", line 150, in get_metadata Exception: Failed to locate a KFX container with metadata `

ElleKayEm commented 3 months ago

The problem is here:

The .kfx-zip archive contains an encrypted DRMION file without a DRM voucher

Did you move the files out of their orginal folder structure?

Another option is to get the book in non-kfx format by going to your content & devices page at Amazon. Select the download & transfer via USB option and pick your Paperwhite as the device.

WPTK commented 3 months ago

I extracted them directly from the Kindle in one case, and in another case, downloaded from the Kindle for PC app (which I didn't think would work anyway).

Download & Transfer via USB is going to be a lot of work for over 300 books. Anything out there that automates it?

ElleKayEm commented 3 months ago

Using Kindle for PC should work with DeDRM 10.0.9. Grabbing them directly from your Paperwhite should work too if left in their original folder structure. But you'll still probably want to add just a few at a time to calibre. Try too many at once and some will be added without DeDRM doing its job.

Elkazuo commented 1 month ago

I had a similar problem, tried another way to DeDRM, and found this website https://www.ebook-converter.com/. This site listed some steps before trying to DeDRM that made some difference. The main thing is to install an old version of Kindle PC (V2.0 and not V2.3) and then download the book because apparently it has a different format to create the KFX. At the end this site offered a program to do DeDRM. When I looked into the program file found out that used the Calibre plugins (Maybe you should check out because the program had a trial for 10 books and then ask for payment... I don't know, if they are using this plugin that is free and are asking for money...). Anyways, I also wanted to add the error my calibre printed:

ApplicationPaletteChange event ignored Using calibre Qt style: True ApplicationPaletteChange event received calibre Registro de depuración calibre 7.10 embedded-python: True Windows-10-10.0.22631-SP0 Windows ('64bit', 'WindowsPE') ('Windows', '10', '10.0.22631') Python 3.11.5 Windows: ('10', '10.0.22631', 'SP0', 'Multiprocessor Free') Interface language: es EXE path: C:\Program Files\Calibre2\calibre-debug.exe Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 10, 0) && DeDRM (10, 0, 3) && Package KFX (from KFX Input) (2, 10, 0) && KFX metadata reader (from KFX Input) (2, 10, 0) && From KFX (2, 10, 0) && KFX Input (2, 10, 0) calibre 7.10 embedded-python: True Windows-10-10.0.22631-SP0 Windows ('64bit', 'WindowsPE') ('Windows', '10', '10.0.22631') Python 3.11.5 Windows: ('10', '10.0.22631', 'SP0', 'Multiprocessor Free') Interface language: es EXE path: C:\Program Files\Calibre2\calibre-debug.exe Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 10, 0) && DeDRM (10, 0, 3) && Package KFX (from KFX Input) (2, 10, 0) && KFX metadata reader (from KFX Input) (2, 10, 0) && From KFX (2, 10, 0) && KFX Input (2, 10, 0) QPA platform: windows devicePixelRatio: 1.25 logicalDpi: 96.0 x 96.0 physicalDpi: 113.41395348837209 x 113.12164948453608 [0.00] Starting up... [0.02] Showing splash screen... [0.28] splash screen shown [0.28] Initializing db... [0.44] db initialized [0.44] Constructing main UI... [3.78] GUI main window shown [4.11] main UI initialized... [4.11] Hiding splash screen [26.27] splash screen hidden [26.27] Started up in 26.27 seconds with 417 books stdout+stderr from file dialog helper: [b'', b''] piped data from file dialog helper: [b'8 \xe1ij\xea):\xec\x17\xb1\x7f]\x92~\x8d\x85)\xa2ZfAV>\xf4\xe6x\xbf\xd9\xce\x9e\xab', b'C:\Users\kazuo\OneDrive\Escuela\My Kindle Content\B005F12G7O_EBOK\B005F12G7O_EBOK.azw'] Gather KFX-ZIP (from KFX Input) 2.10.0: Importing C:\Users\kazuo\OneDrive\Escuela\My Kindle Content\B005F12G7O_EBOK\B005F12G7O_EBOK.azw Gather KFX-ZIP (from KFX Input): File is not KFX format DeDRM v10.0.3: Trying to decrypt B005F12G7O_EBOK.azw Using Library AlfCrypto DLL/DYLIB/SO MobiDeDrm v1.1. Copyright © 2008-2020 The Dark Reverser, Apprentice Harper et al. Decrypting Mobipocket 7 ebook: el Diccionario de la lengua española (Spanish Edition) Found 0 keys to try after 0.6 seconds Crypto Type is: 2 DeDRM v10.0.3: Failed to decrypt with error: No key found in 0 PIDs tried. DeDRM v10.0.3: Looking for new default Kindle Key after 0.6 seconds searching for kinfoFiles in C:\Users\kazuo\AppData\Local Found K4PC 1.25+ kinf2018 file: C:\Users\kazuo\AppData\Local\Amazon\Kindle\storage.kinf2018 Decrypted key file using IDString '144163389' and UserName 'kazuo' DeDRM v10.0.3: Found 1 new key MobiDeDrm v1.1. Copyright © 2008-2020 The Dark Reverser, Apprentice Harper et al. Decrypting Mobipocket 7 ebook: el Diccionario de la lengua española (Spanish Edition) Got DSN key from database key_0 Found 4 keys to try after 1.3 seconds Crypto Type is: 2 File is encoded with PID CplfxtWRDC. Decrypting. Please wait . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . done Decryption succeeded after 2.9 seconds DeDRM v10.0.3: Saving 1 new key DeDRM v10.0.3: Finished after 3.3 seconds Added el Diccionario de la lengua española (Spanish Edition) to db in: 0.3 Added 1 books in 5.6 seconds stdout+stderr from file dialog helper: [b'', b''] piped data from file dialog helper: [b'\xcd\xce3\x04\xc8e\xd0\x8e\x93a\xa8z\xa7\xe4\x83\x9fO~\x14\x81\xd9ZTcj\x17\xb0\x823\xa4\x7f\x86', b'C:\Users\kazuo\OneDrive\Escuela\My Kindle Content\B005F12G7O_EBOK\B005F12G7O_EBOK.azw'] Gather KFX-ZIP (from KFX Input) 2.10.0: Importing C:\Users\kazuo\OneDrive\Escuela\My Kindle Content\B005F12G7O_EBOK\B005F12G7O_EBOK.azw Gather KFX-ZIP (from KFX Input): File is not KFX format DeDRM v10.0.3: Trying to decrypt B005F12G7O_EBOK.azw Using Library AlfCrypto DLL/DYLIB/SO MobiDeDrm v1.1. Copyright © 2008-2020 The Dark Reverser, Apprentice Harper et al. Decrypting Mobipocket 7 ebook: el Diccionario de la lengua española (Spanish Edition) Got DSN key from database kindle_key_1715360467_1 Found 4 keys to try after 0.7 seconds Crypto Type is: 2 File is encoded with PID CplfxtWRDC. Decrypting. Please wait . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . done Decryption succeeded after 2.3 seconds DeDRM v10.0.3: Finished after 2.4 seconds Added 0 books in 12.1 seconds stdout+stderr from file dialog helper: [b'', b''] piped data from file dialog helper: [b'i\xcf%\x02\x1b\x83\xc6^p% \xf6\xbaJ\xbds\xcab\xb7u\xfe\x15\xb5\xbd8\xf4}\xb5\xc6e\xd9\xf5', b'C:\Users\kazuo\OneDrive\Escuela\My Kindle Content\B0741TZPHC_EBOK\B0741TZPHC_EBOK.azw'] Gather KFX-ZIP (from KFX Input) 2.10.0: Importing C:\Users\kazuo\OneDrive\Escuela\My Kindle Content\B0741TZPHC_EBOK\B0741TZPHC_EBOK.azw Gather KFX-ZIP (from KFX Input): Gathered 4 file(s) as C:\Users\kazuo\AppData\Local\Temp\calibretj0v8i3\x2z3sd5g.kfx-zip DeDRM v10.0.3: Trying to decrypt x2z3sd5g.kfx-zip Using Library AlfCrypto DLL/DYLIB/SO Decrypting KFX-ZIP ebook: x2z3sd5g Got DSN key from database kindle_key_1715360467_1 Found 1 keys to try after 0.2 seconds Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.75eeb96e-5a15-4a89-81b1-385e4ec54a7c.voucher Traceback (most recent call last): File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 886, in decryptvoucher File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 762, in pkcs7unpad File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 102, in _assert Exception: Incorrect padding - Wrong key Traceback (most recent call last): File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 886, in decryptvoucher File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 762, in pkcs7unpad File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 102, in _assert Exception: Incorrect padding - Wrong key DeDRM v10.0.3: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key DeDRM v10.0.3: Looking for new default Kindle Key after 0.2 seconds searching for kinfoFiles in C:\Users\kazuo\AppData\Local Found K4PC 1.25+ kinf2018 file: C:\Users\kazuo\AppData\Local\Amazon\Kindle\storage.kinf2018 Decrypted key file using IDString '144163389' and UserName 'kazuo' DeDRM v10.0.3: Ultimately failed to decrypt after 0.6 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md Running file type plugin DeDRM failed with traceback: Traceback (most recent call last): File "calibre_plugins.dedrm.init", line 957, in KindleMobiDecrypt File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 261, in GetDecryptedBook File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher Exception: Failed to decrypt KFX DRM voucher with any key

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "calibre\customize\ui.py", line 199, in _run_filetype_plugins File "calibre_plugins.dedrm.init", line 1056, in run File "calibre_plugins.dedrm.init", line 1007, in KindleMobiDecrypt calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.3: Ultimately failed to decrypt after 0.6 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md Package KFX (from KFX Input) 2.10.0: Packaging C:\Users\kazuo\AppData\Local\Temp\calibretj0v8i3\x2z3sd5g.kfx-zip Processing container: B0741TZPHC_EBOK.azw Running file type plugin Package KFX (from KFX Input) failed with traceback: Traceback (most recent call last): File "calibre\customize\ui.py", line 199, in _run_filetype_plugins File "calibre_plugins.kfx_input.package_filetype", line 23, in run File "calibre_plugins.kfx_input.package_filetype", line 34, in package_kfx File "calibre_plugins.kfx_input.kfxlib.yj_book", line 79, in convert_to_single_kfx File "calibre_plugins.kfx_input.kfxlib.yj_book", line 212, in decode_book File "calibre_plugins.kfx_input.kfxlib.yj_book", line 321, in get_container calibre_plugins.kfx_input.kfxlib.utilities.KFXDRMError: Book container B0741TZPHC_EBOK.azw has DRM and cannot be converted KFX metadata reader (from KFX Input) activated for C:\Users\kazuo\AppData\Local\Temp\calibretj0v8i3\r4tz69i__add_books\0\B0741TZPHC_EBOK.kfx-zip Added Sexualidad masculina: ¿Hombres o titanes? (Spanish Edition) to db in: 0.3 Added 1 books in 2.9 seconds Worker Launch took: 0.20 seconds Job: 0 Convertido el libro 1 de 1 (Sexualidad masculina: ¿Hombres o titanes? (Spanish Edition)) finished Convertido el libro 1 de 1 (Sexualidad masculina: ¿Hombres o titanes? (Spanish Edition)) DeDRM v10.0.3: Trying to decrypt aomtp0g0.kfx-zip Using Library AlfCrypto DLL/DYLIB/SO Decrypting KFX-ZIP ebook: aomtp0g0 Got DSN key from database kindle_key_1715360467_1 Found 1 keys to try after 0.3 seconds Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.75eeb96e-5a15-4a89-81b1-385e4ec54a7c.voucher Traceback (most recent call last): File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 886, in decryptvoucher File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 762, in pkcs7unpad File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 102, in _assert Exception: Incorrect padding - Wrong key Traceback (most recent call last): File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 886, in decryptvoucher File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 762, in pkcs7unpad File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 102, in _assert Exception: Incorrect padding - Wrong key DeDRM v10.0.3: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key DeDRM v10.0.3: Looking for new default Kindle Key after 0.3 seconds searching for kinfoFiles in C:\Users\kazuo\AppData\Local Found K4PC 1.25+ kinf2018 file: C:\Users\kazuo\AppData\Local\Amazon\Kindle\storage.kinf2018 Decrypted key file using IDString '144163389' and UserName 'kazuo' DeDRM v10.0.3: 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 957, in KindleMobiDecrypt File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 261, in GetDecryptedBook File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher Exception: Failed to decrypt KFX DRM voucher with any key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "calibre\customize\ui.py", line 199, in _run_filetype_plugins
  File "calibre_plugins.dedrm.__init__", line 1056, in run
  File "calibre_plugins.dedrm.__init__", line 1007, in KindleMobiDecrypt
calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.3: 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:
  read_metadata_from_opf: 'C:\\Users\\kazuo\\AppData\\Local\\Temp\\calibre_tj0v8i3_\\ysb32lmm.opf'
  cover: 'C:\\Users\\kazuo\\AppData\\Local\\Temp\\calibre_tj0v8i3_\\n59j4axx.jpeg'
  output_profile: 'generic_eink'
  verbose: 2
Resolved conversion options
calibre version: 7.10.0
{'allow_conversion_with_errors': False,
 'asciiize': False,
 'author_sort': None,
 'authors': None,
 'base_font_size': 0.0,
 'book_producer': None,
 'change_justification': 'original',
 'chapter': "//*[((name()='h1' or name()='h2') and re:test(., "
            "'\\s*((chapter|book|section|part)\\s+)|((prolog|prologue|epilogue)(\\s+|$))', "
            "'i')) or @class = 'chapter']",
 'chapter_mark': 'pagebreak',
 'comments': None,
 'cover': 'C:\\Users\\kazuo\\AppData\\Local\\Temp\\calibre_tj0v8i3_\\n59j4axx.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 0x000002A6EE61C350>,
 '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.GenericEink object at 0x000002A6EE62F910>,
 '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\\kazuo\\AppData\\Local\\Temp\\calibre_tj0v8i3_\\ysb32lmm.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.3: Trying to decrypt aomtp0g0.kfx-zip
Decrypting KFX-ZIP ebook: aomtp0g0
Got DSN key from database kindle_key_1715360467_1
Found 1 keys to try after 0.1 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.75eeb96e-5a15-4a89-81b1-385e4ec54a7c.voucher
Traceback (most recent call last):
  File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 886, in decryptvoucher
  File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 762, in pkcs7unpad
  File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 102, in _assert
Exception: Incorrect padding - Wrong key
Traceback (most recent call last):
  File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 886, in decryptvoucher
  File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 762, in pkcs7unpad
  File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 102, in _assert
Exception: Incorrect padding - Wrong key
DeDRM v10.0.3: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key
DeDRM v10.0.3: Looking for new default Kindle Key after 0.1 seconds
searching for kinfoFiles in C:\Users\kazuo\AppData\Local
Found K4PC 1.25+ kinf2018 file: C:\Users\kazuo\AppData\Local\Amazon\Kindle\storage\.kinf2018
Decrypted key file using IDString '144163389' and UserName 'kazuo'
DeDRM v10.0.3: 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 957, in KindleMobiDecrypt
  File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 261, in GetDecryptedBook
  File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\kazuo\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "calibre\customize\ui.py", line 199, in _run_filetype_plugins
  File "calibre_plugins.dedrm.__init__", line 1056, in run
  File "calibre_plugins.dedrm.__init__", line 1007, in KindleMobiDecrypt
calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.3: 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\kazuo\AppData\Local\Temp\calibre_tj0v8i3_\aomtp0g0.kfx-zip
Software versions: KFX Input 2.10.0, calibre 7.10, Windows-10-10.0.22631-SP0
KFX Input plugin help is available at https://www.mobileread.com/forums/showthread.php?t=291290
Converting C:\Users\kazuo\AppData\Local\Temp\calibre_tj0v8i3_\aomtp0g0.kfx-zip
Processing container: B0741TZPHC_EBOK.azw
Traceback (most recent call last):
  File "calibre_plugins.kfx_input.__init__", line 102, in convert
  File "calibre_plugins.kfx_input.kfxlib.yj_book", line 212, in decode_book
  File "calibre_plugins.kfx_input.kfxlib.yj_book", line 321, in get_container
calibre_plugins.kfx_input.kfxlib.utilities.KFXDRMError: Book container B0741TZPHC_EBOK.azw has DRM and cannot be converted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "runpy.py", line 198, in _run_module_as_main
  File "runpy.py", line 88, in _run_code
  File "site.py", line 83, in <module>
  File "site.py", line 78, in main
  File "site.py", line 50, in run_entry_point
  File "calibre\utils\ipc\worker.py", line 215, in main
  File "calibre\gui2\convert\gui_conversion.py", line 38, in gui_convert_override
  File "calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert
  File "calibre\ebooks\conversion\plumber.py", line 1122, in run
  File "calibre\customize\conversion.py", line 245, in __call__
  File "calibre_plugins.kfx_input.__init__", line 121, in convert
calibre.ebooks.DRMError: This book has DRM!
ElleKayEm commented 1 month ago

@Elkazuo Update to DeDRM 10.0.9: https://github.com/noDRM/DeDRM_tools/releases/tag/v10.0.9

Elkazuo commented 1 month ago

@Elkazuo Update to DeDRM 10.0.9: https://github.com/noDRM/DeDRM_tools/releases/tag/v10.0.9

Thanks so much, github just showed me the 10.0.3 version. I updated the plugin and it worked.