noDRM / DeDRM_tools

DeDRM tools for ebooks
6.57k stars 287 forks source link

View/Convert AZW book DRM error in Calibre 7.1.0 #450

Closed ScotterMonk closed 6 months ago

ScotterMonk commented 6 months ago

Question / bug report

Pasted error log in "Log output" below. Thanks for any help you can give! Also, thanks for your contribution to freeing information!

Which version of Calibre are you running?

7.1.0

Which version of the DeDRM plugin are you running?

v10.0.3

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

2.2.0 (70623)

Log output

calibre, version 7.1.0
ERROR: Loading book failed: Failed to open the book at D:\Dropbox\Articles\books\Calibre\Peter F. Hamilton\01-The Reality Dysfunction (2)\01-The Reality Dysfunction - Peter F. Hamilton.azw. Click "Show details" for more info.

Failed to convert book: D:\Dropbox\Articles\books\Calibre\Peter F. Hamilton\01-The Reality Dysfunction (2)\01-The Reality Dysfunction - Peter F. Hamilton.azw with error:
Traceback (most recent call last):
  File "calibre\customize\ui.py", line 469, in get_file_type_metadata
  File "calibre\customize\builtins.py", line 266, in get_metadata
  File "calibre\ebooks\metadata\mobi.py", line 503, in get_metadata
  File "calibre\ebooks\mobi\reader\headers.py", line 293, in __init__
  File "calibre\ebooks\mobi\reader\headers.py", line 321, in identity
calibre.ebooks.mobi.MobiError: Unknown book type: b'\x81\xc4\xde\x02\x9c\x8c"\x08'
DeDRM v10.0.3: Trying to decrypt 01-The Reality Dysfunction - Peter F. Hamilton.azw
Using Library AlfCrypto DLL/DYLIB/SO
DeDRM v10.0.3: Failed to decrypt with error: The .kfx DRMION file cannot be decrypted by itself. A .kfx-zip archive containing a DRM voucher is required.
DeDRM v10.0.3: Looking for new default Kindle Key after 0.1 seconds
searching for kinfoFiles in C:\Users\scott\AppData\Local
Found K4PC 1.25+ kinf2018 file: C:\Users\scott\AppData\Local\Amazon\Kindle\storage\.kinf2018
Decrypted key file using IDString '3128738291' and UserName 'scott'
DeDRM v10.0.3: Found 1 new key
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 957, in KindleMobiDecrypt
  File "C:\Users\scott\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 228, in GetDecryptedBook
k4mobidedrm.DrmException: The .kfx DRMION file cannot be decrypted by itself. A .kfx-zip archive containing a DRM voucher is required.

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\scott\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 228, in GetDecryptedBook
k4mobidedrm.DrmException: The .kfx DRMION file cannot be decrypted by itself. A .kfx-zip archive containing a DRM voucher is required.
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\scott\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 228, in GetDecryptedBook
k4mobidedrm.DrmException: The .kfx DRMION file cannot be decrypted by itself. A .kfx-zip archive containing a DRM voucher is required.

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
InputFormatPlugin: MOBI Input running
on D:\Dropbox\Articles\books\Calibre\Peter F. Hamilton\01-The Reality Dysfunction (2)\01-The Reality Dysfunction - Peter F. Hamilton.azw
Failed to run pipe worker with command: from calibre.srv.render_book import viewer_main; viewer_main()
Traceback (most recent call last):
  File "calibre\ebooks\conversion\plugins\mobi_input.py", line 27, in convert
  File "calibre\ebooks\mobi\reader\mobi6.py", line 89, in __init__
calibre.ebooks.mobi.reader.mobi6.KFXError: This is an Amazon KFX book. It cannot be processed. See https://www.mobileread.com/forums/showthread.php?t=283371 for information on how to handle KFX books.

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 196, in main
  File "<string>", line 1, in <module>
  File "calibre\srv\render_book.py", line 952, in viewer_main
  File "calibre\srv\render_book.py", line 943, in render_for_viewer
  File "calibre\srv\render_book.py", line 920, in render
  File "calibre\ebooks\oeb\iterator\book.py", line 62, in extract_book
  File "calibre\customize\conversion.py", line 242, in __call__
  File "calibre\ebooks\conversion\plugins\mobi_input.py", line 33, in convert
  File "calibre\ebooks\mobi\reader\mobi6.py", line 89, in __init__
calibre.ebooks.mobi.reader.mobi6.KFXError: This is an Amazon KFX book. It cannot be processed. See https://www.mobileread.com/forums/showthread.php?t=283371 for information on how to handle KFX books.
ElleKayEm commented 6 months ago

That's kfx format. You'll need DeDRM 10.0.9 and the KFX Input plugin. https://github.com/noDRM/DeDRM_tools/releases/tag/v10.0.9 https://www.mobileread.com/forums/showthread.php?t=291290

Also, you need to leave the book files in their original folder structure. You've moved the main book file away from the other corresponding files so DeDRM doesn't have the info it needs.

And how was this book downloaded?

ScotterMonk commented 6 months ago

That's kfx format. You'll need DeDRM 10.0.9 and the KFX Input plugin. https://github.com/noDRM/DeDRM_tools/releases/tag/v10.0.9 https://www.mobileread.com/forums/showthread.php?t=291290

Also, you need to leave the book files in their original folder structure. You've moved the main book file away from the other corresponding files so DeDRM doesn't have the info it needs.

And how was this book downloaded?

THANK YOU! That worked!

ElleKayEm commented 6 months ago

If you're all set, you can close the issue.