noDRM / DeDRM_tools

DeDRM tools for ebooks
7.3k stars 323 forks source link

Can not remove DRM on M1 Mac Monterey from Amazon Kindle books #46

Open rkrug opened 2 years ago

rkrug commented 2 years ago

Question / bug report

M1 MacBook, running Monterey 12.2.1

I am trying to import and remove DRM from a number of Amazon kindle books, but it always tells me "Wrong key" (see log below).

I have entered the serial numbers from my two kindles (eInk Kindle eBooks), and have added the default_key to the "Kindle for Mac/PC ebooks" section.

All three are used (log file) but none works. What am I missing?

Which version of Calibre are you running?

5.37

Which version of the DeDRM plugin are you running?

v10.0.2

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

1.34.1 (63102)

Log output

calibre Debug log
calibre 5.37  embedded-python: True is64bit: True
macOS-10.16-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '21.3.0', 'Darwin Kernel Version 21.3.0: Wed Jan  5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T6000')
Python 3.8.5
OSX: ('10.16', ('', '', ''), 'x86_64')
Interface language: None
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 47, 0) && DeDRM (10, 0, 2) && Package KFX (from KFX Input) (1, 47, 0) && KFX metadata reader (from KFX Input) (1, 47, 0) && KFX Input (1, 47, 0) && Set KFX metadata (from KFX Output) (1, 59, 0) && KFX Output (1, 59, 0) && Obok DeDRM (10, 0, 0)
calibre 5.37  embedded-python: True is64bit: True
macOS-10.16-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '21.3.0', 'Darwin Kernel Version 21.3.0: Wed Jan  5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T6000')
Python 3.8.5
OSX: ('10.16', ('', '', ''), 'x86_64')
Interface language: None
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 47, 0) && DeDRM (10, 0, 2) && Package KFX (from KFX Input) (1, 47, 0) && KFX metadata reader (from KFX Input) (1, 47, 0) && KFX Input (1, 47, 0) && Set KFX metadata (from KFX Output) (1, 59, 0) && KFX Output (1, 59, 0) && Obok DeDRM (10, 0, 0)
devicePixelRatio: 2.0
logicalDpi: 72.0 x 72.0
physicalDpi: 127.50000191485789 x 127.50000191485789
Using calibre Qt style: True
[0.00] Starting up...
[0.02] Showing splash screen...
[0.24] splash screen shown
[0.24] Initializing db...
[0.25] db initialized
[0.25] Constructing main UI...
DEBUG:    0.0 obok::utilities.py - loading translations
DEBUG:    0.0 obok::dialogs.py - loading translations
DEBUG:    0.0 obok::config.py - loading translations
DEBUG:    0.0 obok::action_err.py - loading translations
[1.01] main UI initialized...
[1.01] Hiding splash screen
Starting QuickView
Gather KFX-ZIP (from KFX Input) 1.47.0: Importing /Users/rainerkrug/Library/Application Support/Kindle/My Kindle Content/B00A61ZV3O_EBOK/B00A61ZV3O_EBOK.azw
Gather KFX-ZIP (from KFX Input): Gathered 4 file(s) as /var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/rn_19cvk.kfx-zip
DeDRM v10.0.2: Trying to decrypt rn_19cvk.kfx-zip
Using Library AlfCrypto Python
Using Library AlfCrypto Python
Decrypting KFX-ZIP ebook: rn_19cvk
Got DSN key from database default_key
Found 3 keys to try after 0.1 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.37035179-6fac-424a-9050-9298b65c9671.voucher
Traceback (most recent call last):
  File "calibre_plugins.dedrm.kfxdedrm", line 83, in decrypt_voucher
    voucher.decryptvoucher()
  File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/1x32gtvuplugin_unzip/ion.py", line 879, in decryptvoucher
    b = pkcs7unpad(b, 16)
  File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/1x32gtvuplugin_unzip/ion.py", line 758, in pkcs7unpad
    _assert(paddinglen > 0 and paddinglen <= blocklen, "Incorrect padding - Wrong key")
  File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/1x32gtvuplugin_unzip/ion.py", line 98, in _assert
    raise Exception(msg)
Exception: Incorrect padding - Wrong key
Traceback (most recent call last):
  File "calibre_plugins.dedrm.kfxdedrm", line 83, in decrypt_voucher
    voucher.decryptvoucher()
  File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/1x32gtvuplugin_unzip/ion.py", line 879, in decryptvoucher
    b = pkcs7unpad(b, 16)
  File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/1x32gtvuplugin_unzip/ion.py", line 758, in pkcs7unpad
    _assert(paddinglen > 0 and paddinglen <= blocklen, "Incorrect padding - Wrong key")
  File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/1x32gtvuplugin_unzip/ion.py", line 98, in _assert
    raise Exception(msg)
Exception: Incorrect padding - Wrong key
Traceback (most recent call last):
  File "calibre_plugins.dedrm.kfxdedrm", line 83, in decrypt_voucher
    voucher.decryptvoucher()
  File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/1x32gtvuplugin_unzip/ion.py", line 879, in decryptvoucher
    b = pkcs7unpad(b, 16)
  File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/1x32gtvuplugin_unzip/ion.py", line 758, in pkcs7unpad
    _assert(paddinglen > 0 and paddinglen <= blocklen, "Incorrect padding - Wrong key")
  File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/1x32gtvuplugin_unzip/ion.py", line 98, in _assert
    raise Exception(msg)
Exception: Incorrect padding - Wrong key
Traceback (most recent call last):
  File "calibre_plugins.dedrm.kfxdedrm", line 83, in decrypt_voucher
    voucher.decryptvoucher()
  File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/1x32gtvuplugin_unzip/ion.py", line 879, in decryptvoucher
    b = pkcs7unpad(b, 16)
  File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/1x32gtvuplugin_unzip/ion.py", line 758, in pkcs7unpad
    _assert(paddinglen > 0 and paddinglen <= blocklen, "Incorrect padding - Wrong key")
  File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/1x32gtvuplugin_unzip/ion.py", line 98, in _assert
    raise Exception(msg)
Exception: Incorrect padding - Wrong key
DeDRM v10.0.2: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key
DeDRM v10.0.2: Looking for new default Kindle Key after 0.1 seconds
Found k4Mac kinf2018 file: /Users/rainerkrug/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/storage/.kinf2018
Found k4Mac kinf2018 file: /Users/rainerkrug/Library/Application Support/Kindle/storage/.kinf2018
trying username  b'rainerkrug'  on file  /Users/rainerkrug/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/storage/.kinf2018
trying IDString: b'9f65a889d4a4'
[20.69] splash screen hidden
[20.69] Started up in 20.69 seconds with 50 books
trying IDString: b'9f65a889d4a7'
trying IDString: b'9f65a889d4a6'
trying IDString: b'5de82cf625cd'
trying IDString: b'930f148de1a5'
trying IDString: b'930f148de1a1'
trying IDString: b'930f148de1ad'
trying IDString: b'930f148de1a5'
trying IDString: b'disk3s1s1'
trying IDString: b'disk3s6'
trying IDString: b'disk3s2'
trying IDString: b'disk3s4'
trying IDString: b'disk1s2'
trying IDString: b'disk1s1'
trying IDString: b'disk1s3'
trying IDString: b'disk3s5'
trying IDString: b'disk5s1'
trying IDString: b'9999999999'
Couldn't decrypt file.
trying username  b'rainerkrug'  on file  /Users/rainerkrug/Library/Application Support/Kindle/storage/.kinf2018
trying IDString: b'9f65a889d4a4'
trying IDString: b'9f65a889d4a7'
trying IDString: b'9f65a889d4a6'
trying IDString: b'5de82cf625cd'
Decrypted key file using IDString '5de82cf625cd' and UserName 'rainerkrug'
DeDRM v10.0.2: Found 1 new key
Decrypting KFX-ZIP ebook: rn_19cvk
Got DSN key from database default_key_1
Found 1 keys to try after 10.4 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.37035179-6fac-424a-9050-9298b65c9671.voucher
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 795, in KindleMobiDecrypt
    book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
  File "calibre_plugins.dedrm.k4mobidedrm", line 244, in GetDecryptedBook
    mb.processBook(totalpids)
  File "calibre_plugins.dedrm.kfxdedrm", line 45, in processBook
    self.decrypt_voucher(totalpids)
  File "calibre_plugins.dedrm.kfxdedrm", line 89, in decrypt_voucher
    raise Exception("Failed to decrypt KFX DRM voucher with any key")
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.kfxdedrm", line 83, in decrypt_voucher
    voucher.decryptvoucher()
  File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/1x32gtvuplugin_unzip/ion.py", line 879, in decryptvoucher
    b = pkcs7unpad(b, 16)
  File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/1x32gtvuplugin_unzip/ion.py", line 758, in pkcs7unpad
    _assert(paddinglen > 0 and paddinglen <= blocklen, "Incorrect padding - Wrong key")
  File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/1x32gtvuplugin_unzip/ion.py", line 98, in _assert
    raise Exception(msg)
Exception: Incorrect padding - Wrong key
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 795, in KindleMobiDecrypt
    book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
  File "calibre_plugins.dedrm.k4mobidedrm", line 244, in GetDecryptedBook
    mb.processBook(totalpids)
  File "calibre_plugins.dedrm.kfxdedrm", line 45, in processBook
    self.decrypt_voucher(totalpids)
  File "calibre_plugins.dedrm.kfxdedrm", line 89, in decrypt_voucher
    raise Exception("Failed to decrypt KFX DRM voucher with any key")
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.kfxdedrm", line 83, in decrypt_voucher
    voucher.decryptvoucher()
  File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/1x32gtvuplugin_unzip/ion.py", line 879, in decryptvoucher
    b = pkcs7unpad(b, 16)
  File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/1x32gtvuplugin_unzip/ion.py", line 758, in pkcs7unpad
    _assert(paddinglen > 0 and paddinglen <= blocklen, "Incorrect padding - Wrong key")
  File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/1x32gtvuplugin_unzip/ion.py", line 98, in _assert
    raise Exception(msg)
Exception: Incorrect padding - Wrong key
DeDRM v10.0.2: Ultimately failed to decrypt after 10.4 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
Package KFX (from KFX Input) 1.47.0: Packaging /var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/rn_19cvk.kfx-zip
Processing container: B00A61ZV3O_EBOK.azw
KFX metadata reader (from KFX Input) activated for /var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/03v6ztuc_add_books/0/B00A61ZV3O_EBOK.kfx-zip
Running file type plugin DeDRM failed with traceback:
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 795, in KindleMobiDecrypt
    book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
  File "calibre_plugins.dedrm.k4mobidedrm", line 244, in GetDecryptedBook
    mb.processBook(totalpids)
  File "calibre_plugins.dedrm.kfxdedrm", line 45, in processBook
    self.decrypt_voucher(totalpids)
  File "calibre_plugins.dedrm.kfxdedrm", line 89, in decrypt_voucher
    raise Exception("Failed to decrypt KFX DRM voucher with any key")
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 175, in _run_filetype_plugins
  File "calibre_plugins.dedrm.__init__", line 888, in run
    decrypted_ebook = self.KindleMobiDecrypt(path_to_ebook)
  File "calibre_plugins.dedrm.__init__", line 838, in KindleMobiDecrypt
    raise DeDRMError("{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime))
calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.2: Ultimately failed to decrypt after 10.4 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
Running file type plugin Package KFX (from KFX Input) failed with traceback:
Traceback (most recent call last):
  File "calibre/customize/ui.py", line 175, in _run_filetype_plugins
  File "calibre_plugins.kfx_input.package_filetype", line 21, in run
    return self.run_kfx(path_to_ebook)
  File "calibre_plugins.kfx_input.package_filetype", line 32, in run_kfx
    kfx_data = YJ_Book(path_to_ebook).convert_to_single_kfx()
  File "calibre_plugins.kfx_input.kfxlib.yj_book", line 83, in convert_to_single_kfx
    self.decode_book()
  File "calibre_plugins.kfx_input.kfxlib.yj_book", line 210, in decode_book
    container = self.get_container(datafile)
  File "calibre_plugins.kfx_input.kfxlib.yj_book", line 317, in get_container
    raise KFXDRMError("Book container %s has DRM and cannot be converted" % datafile.name)
calibre_plugins.kfx_input.kfxlib.utilities.KFXDRMError: Book container B00A61ZV3O_EBOK.azw has DRM and cannot be converted
Added The Shining Girls to db in: 0.0
Added 1 books in 11.0 seconds
Worker Launch took: 0.02 seconds
Job: 0 Convert book 1 of 1 (The Shining Girls) finished
Convert book 1 of 1 (The Shining Girls)
    DeDRM v10.0.2: Trying to decrypt gkefjbxo.kfx-zip
    Using Library AlfCrypto Python
    Using Library AlfCrypto Python
    Decrypting KFX-ZIP ebook: gkefjbxo
    Got DSN key from database default_key
    Found 3 keys to try after 0.1 seconds
    Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.37035179-6fac-424a-9050-9298b65c9671.voucher
    Traceback (most recent call last):
      File "calibre_plugins.dedrm.kfxdedrm", line 83, in decrypt_voucher
        voucher.decryptvoucher()
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 879, in decryptvoucher
        b = pkcs7unpad(b, 16)
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 758, in pkcs7unpad
        _assert(paddinglen > 0 and paddinglen <= blocklen, "Incorrect padding - Wrong key")
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 98, in _assert
        raise Exception(msg)
    Exception: Incorrect padding - Wrong key
    Traceback (most recent call last):
      File "calibre_plugins.dedrm.kfxdedrm", line 83, in decrypt_voucher
        voucher.decryptvoucher()
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 879, in decryptvoucher
        b = pkcs7unpad(b, 16)
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 758, in pkcs7unpad
        _assert(paddinglen > 0 and paddinglen <= blocklen, "Incorrect padding - Wrong key")
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 98, in _assert
        raise Exception(msg)
    Exception: Incorrect padding - Wrong key
    Traceback (most recent call last):
      File "calibre_plugins.dedrm.kfxdedrm", line 83, in decrypt_voucher
        voucher.decryptvoucher()
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 879, in decryptvoucher
        b = pkcs7unpad(b, 16)
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 758, in pkcs7unpad
        _assert(paddinglen > 0 and paddinglen <= blocklen, "Incorrect padding - Wrong key")
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 98, in _assert
        raise Exception(msg)
    Exception: Incorrect padding - Wrong key
    Traceback (most recent call last):
      File "calibre_plugins.dedrm.kfxdedrm", line 83, in decrypt_voucher
        voucher.decryptvoucher()
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 879, in decryptvoucher
        b = pkcs7unpad(b, 16)
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 758, in pkcs7unpad
        _assert(paddinglen > 0 and paddinglen <= blocklen, "Incorrect padding - Wrong key")
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 98, in _assert
        raise Exception(msg)
    Exception: Incorrect padding - Wrong key
    DeDRM v10.0.2: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key
    DeDRM v10.0.2: Looking for new default Kindle Key after 0.1 seconds
    Found k4Mac kinf2018 file: /Users/rainerkrug/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/storage/.kinf2018
    Found k4Mac kinf2018 file: /Users/rainerkrug/Library/Application Support/Kindle/storage/.kinf2018
    trying username  b'rainerkrug'  on file  /Users/rainerkrug/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/storage/.kinf2018
    trying IDString: b'9f65a889d4a4'
    trying IDString: b'9f65a889d4a7'
    trying IDString: b'9f65a889d4a6'
    trying IDString: b'5de82cf625cd'
    trying IDString: b'930f148de1a5'
    trying IDString: b'930f148de1a1'
    trying IDString: b'930f148de1ad'
    trying IDString: b'930f148de1a5'
    trying IDString: b'disk3s1s1'
    trying IDString: b'disk3s6'
    trying IDString: b'disk3s2'
    trying IDString: b'disk3s4'
    trying IDString: b'disk1s2'
    trying IDString: b'disk1s1'
    trying IDString: b'disk1s3'
    trying IDString: b'disk3s5'
    trying IDString: b'disk5s1'
    trying IDString: b'9999999999'
    Couldn't decrypt file.
    trying username  b'rainerkrug'  on file  /Users/rainerkrug/Library/Application Support/Kindle/storage/.kinf2018
    trying IDString: b'9f65a889d4a4'
    trying IDString: b'9f65a889d4a7'
    trying IDString: b'9f65a889d4a6'
    trying IDString: b'5de82cf625cd'
    Decrypted key file using IDString '5de82cf625cd' and UserName 'rainerkrug'
    DeDRM v10.0.2: Found 1 new key
    Decrypting KFX-ZIP ebook: gkefjbxo
    Got DSN key from database default_key_1
    Found 1 keys to try after 10.4 seconds
    Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.37035179-6fac-424a-9050-9298b65c9671.voucher
    Traceback (most recent call last):
      File "calibre_plugins.dedrm.__init__", line 795, in KindleMobiDecrypt
        book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
      File "calibre_plugins.dedrm.k4mobidedrm", line 244, in GetDecryptedBook
        mb.processBook(totalpids)
      File "calibre_plugins.dedrm.kfxdedrm", line 45, in processBook
        self.decrypt_voucher(totalpids)
      File "calibre_plugins.dedrm.kfxdedrm", line 89, in decrypt_voucher
        raise Exception("Failed to decrypt KFX DRM voucher with any key")
    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.kfxdedrm", line 83, in decrypt_voucher
        voucher.decryptvoucher()
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 879, in decryptvoucher
        b = pkcs7unpad(b, 16)
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 758, in pkcs7unpad
        _assert(paddinglen > 0 and paddinglen <= blocklen, "Incorrect padding - Wrong key")
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 98, in _assert
        raise Exception(msg)
    Exception: Incorrect padding - Wrong key
    Traceback (most recent call last):
      File "calibre_plugins.dedrm.__init__", line 795, in KindleMobiDecrypt
        book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
      File "calibre_plugins.dedrm.k4mobidedrm", line 244, in GetDecryptedBook
        mb.processBook(totalpids)
      File "calibre_plugins.dedrm.kfxdedrm", line 45, in processBook
        self.decrypt_voucher(totalpids)
      File "calibre_plugins.dedrm.kfxdedrm", line 89, in decrypt_voucher
        raise Exception("Failed to decrypt KFX DRM voucher with any key")
    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.kfxdedrm", line 83, in decrypt_voucher
        voucher.decryptvoucher()
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 879, in decryptvoucher
        b = pkcs7unpad(b, 16)
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 758, in pkcs7unpad
        _assert(paddinglen > 0 and paddinglen <= blocklen, "Incorrect padding - Wrong key")
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 98, in _assert
        raise Exception(msg)
    Exception: Incorrect padding - Wrong key
    DeDRM v10.0.2: Ultimately failed to decrypt after 10.4 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
    Conversion options changed from defaults:
      verbose: 2
      read_metadata_from_opf: '/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/o56p07u4.opf'
      cover: '/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/enrmy9vt.jpeg'
    Resolved conversion options
    calibre version: 5.37.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': '/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/enrmy9vt.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_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 0x116c5f520>,
     '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.OutputProfile object at 0x116c5f7f0>,
     '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': '/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/o56p07u4.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}
    Running file type plugin DeDRM failed with traceback:
    Traceback (most recent call last):
      File "calibre_plugins.dedrm.__init__", line 795, in KindleMobiDecrypt
        book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
      File "calibre_plugins.dedrm.k4mobidedrm", line 244, in GetDecryptedBook
        mb.processBook(totalpids)
      File "calibre_plugins.dedrm.kfxdedrm", line 45, in processBook
        self.decrypt_voucher(totalpids)
      File "calibre_plugins.dedrm.kfxdedrm", line 89, in decrypt_voucher
        raise Exception("Failed to decrypt KFX DRM voucher with any key")
    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 175, in _run_filetype_plugins
      File "calibre_plugins.dedrm.__init__", line 888, in run
        decrypted_ebook = self.KindleMobiDecrypt(path_to_ebook)
      File "calibre_plugins.dedrm.__init__", line 838, in KindleMobiDecrypt
        raise DeDRMError("{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime))
    calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.2: Ultimately failed to decrypt after 10.4 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
    DeDRM v10.0.2: Trying to decrypt gkefjbxo.kfx-zip
    Decrypting KFX-ZIP ebook: gkefjbxo
    Got DSN key from database default_key
    Found 3 keys to try after 0.0 seconds
    Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.37035179-6fac-424a-9050-9298b65c9671.voucher
    Traceback (most recent call last):
      File "calibre_plugins.dedrm.kfxdedrm", line 83, in decrypt_voucher
        voucher.decryptvoucher()
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 879, in decryptvoucher
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 758, in pkcs7unpad
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 98, in _assert
    Exception: Incorrect padding - Wrong key
    Traceback (most recent call last):
      File "calibre_plugins.dedrm.kfxdedrm", line 83, in decrypt_voucher
        voucher.decryptvoucher()
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 879, in decryptvoucher
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 758, in pkcs7unpad
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 98, in _assert
    Exception: Incorrect padding - Wrong key
    Traceback (most recent call last):
      File "calibre_plugins.dedrm.kfxdedrm", line 83, in decrypt_voucher
        voucher.decryptvoucher()
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 879, in decryptvoucher
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 758, in pkcs7unpad
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 98, in _assert
    Exception: Incorrect padding - Wrong key
    Traceback (most recent call last):
      File "calibre_plugins.dedrm.kfxdedrm", line 83, in decrypt_voucher
        voucher.decryptvoucher()
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 879, in decryptvoucher
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 758, in pkcs7unpad
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 98, in _assert
    Exception: Incorrect padding - Wrong key
    DeDRM v10.0.2: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key
    DeDRM v10.0.2: Looking for new default Kindle Key after 0.0 seconds
    Found k4Mac kinf2018 file: /Users/rainerkrug/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/storage/.kinf2018
    Found k4Mac kinf2018 file: /Users/rainerkrug/Library/Application Support/Kindle/storage/.kinf2018
    trying username  b'rainerkrug'  on file  /Users/rainerkrug/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/storage/.kinf2018
    trying IDString: b'9f65a889d4a4'
    trying IDString: b'9f65a889d4a7'
    trying IDString: b'9f65a889d4a6'
    trying IDString: b'5de82cf625cd'
    trying IDString: b'930f148de1a5'
    trying IDString: b'930f148de1a1'
    trying IDString: b'930f148de1ad'
    trying IDString: b'930f148de1a5'
    trying IDString: b'disk3s1s1'
    trying IDString: b'disk3s6'
    trying IDString: b'disk3s2'
    trying IDString: b'disk3s4'
    trying IDString: b'disk1s2'
    trying IDString: b'disk1s1'
    trying IDString: b'disk1s3'
    trying IDString: b'disk3s5'
    trying IDString: b'disk5s1'
    trying IDString: b'9999999999'
    Couldn't decrypt file.
    trying username  b'rainerkrug'  on file  /Users/rainerkrug/Library/Application Support/Kindle/storage/.kinf2018
    trying IDString: b'9f65a889d4a4'
    trying IDString: b'9f65a889d4a7'
    trying IDString: b'9f65a889d4a6'
    trying IDString: b'5de82cf625cd'
    Decrypted key file using IDString '5de82cf625cd' and UserName 'rainerkrug'
    DeDRM v10.0.2: Found 1 new key
    Decrypting KFX-ZIP ebook: gkefjbxo
    Got DSN key from database default_key_1
    Found 1 keys to try after 10.3 seconds
    Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.37035179-6fac-424a-9050-9298b65c9671.voucher
    Traceback (most recent call last):
      File "calibre_plugins.dedrm.__init__", line 795, in KindleMobiDecrypt
        book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
      File "calibre_plugins.dedrm.k4mobidedrm", line 244, in GetDecryptedBook
        mb.processBook(totalpids)
      File "calibre_plugins.dedrm.kfxdedrm", line 45, in processBook
        self.decrypt_voucher(totalpids)
      File "calibre_plugins.dedrm.kfxdedrm", line 89, in decrypt_voucher
        raise Exception("Failed to decrypt KFX DRM voucher with any key")
    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.kfxdedrm", line 83, in decrypt_voucher
        voucher.decryptvoucher()
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 879, in decryptvoucher
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 758, in pkcs7unpad
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 98, in _assert
    Exception: Incorrect padding - Wrong key
    Traceback (most recent call last):
      File "calibre_plugins.dedrm.__init__", line 795, in KindleMobiDecrypt
        book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
      File "calibre_plugins.dedrm.k4mobidedrm", line 244, in GetDecryptedBook
        mb.processBook(totalpids)
      File "calibre_plugins.dedrm.kfxdedrm", line 45, in processBook
        self.decrypt_voucher(totalpids)
      File "calibre_plugins.dedrm.kfxdedrm", line 89, in decrypt_voucher
        raise Exception("Failed to decrypt KFX DRM voucher with any key")
    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.kfxdedrm", line 83, in decrypt_voucher
        voucher.decryptvoucher()
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 879, in decryptvoucher
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 758, in pkcs7unpad
      File "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/0d84f00wplugin_unzip/ion.py", line 98, in _assert
    Exception: Incorrect padding - Wrong key
    DeDRM v10.0.2: Ultimately failed to decrypt after 10.3 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/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 795, in KindleMobiDecrypt
        book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
      File "calibre_plugins.dedrm.k4mobidedrm", line 244, in GetDecryptedBook
        mb.processBook(totalpids)
      File "calibre_plugins.dedrm.kfxdedrm", line 45, in processBook
        self.decrypt_voucher(totalpids)
      File "calibre_plugins.dedrm.kfxdedrm", line 89, in decrypt_voucher
        raise Exception("Failed to decrypt KFX DRM voucher with any key")
    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 175, in _run_filetype_plugins
      File "calibre_plugins.dedrm.__init__", line 888, in run
        decrypted_ebook = self.KindleMobiDecrypt(path_to_ebook)
      File "calibre_plugins.dedrm.__init__", line 838, in KindleMobiDecrypt
        raise DeDRMError("{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime))
    calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.2: Ultimately failed to decrypt after 10.3 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
    InputFormatPlugin: KFX Input running
    on /var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/gkefjbxo.kfx-zip
    Software versions: KFX Input 1.47.0, calibre 5.37, macOS-10.16-x86_64-i386-64bit
    KFX Input plugin help is available at https://www.mobileread.com/forums/showthread.php?t=291290
    Converting /var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/C/calibre_5.37.0_tmp_kys3rgj6/gkefjbxo.kfx-zip
    Processing container: B00A61ZV3O_EBOK.azw
    Traceback (most recent call last):
      File "calibre_plugins.kfx_input.__init__", line 105, in convert
      File "calibre_plugins.kfx_input.kfxlib.yj_book", line 210, in decode_book
      File "calibre_plugins.kfx_input.kfxlib.yj_book", line 317, in get_container
    calibre_plugins.kfx_input.kfxlib.utilities.KFXDRMError: Book container B00A61ZV3O_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 194, in _run_module_as_main
      File "runpy.py", line 87, in _run_code
      File "site.py", line 39, in <module>
      File "site.py", line 35, in main
      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 125, in convert
    calibre.ebooks.DRMError: This book has DRM!
ElleKayEm commented 2 years ago

The KFX format can only be decrypted if it was downloaded with Kindle for Mac 1.26 or earlier.

Since you have E-ink Kindles, I suggest downloading your books from the website and choosing one of those Kindles for the device.

Or you can disable KFX downloads from Kindle for Mac with method 2 here: https://www.mobileread.com/forums/showthread.php?t=283371

Also see: https://www.mobileread.com/forums/showpost.php?p=3819708&postcount=508

romad275 commented 2 years ago

Hmm, he said he had already entered the serial numbers for the Kindles. Do I understand that even WITH them, the ebook still MUST be downloaded in K4M 1.26 or earlier? That Kindle serial numbers WON’T work in K4M 1.27 and higher?

Sincerely, Dennis B. Swaney

Cogito Ergo Mac

On 20Feb22, at 9:06 , ElleKayEm @.***> wrote:

The KFX format can only be decrypted if it was downloaded with Kindle for Mac 1.26 or earlier.

Since you have E-ink Kindles, I suggest downloading your books from the website and choosing one of those Kindles for the device.

Or you can disable KFX downloads from Kindle for Mac with method 2 here: https://www.mobileread.com/forums/showthread.php?t=283371

Also see: https://www.mobileread.com/forums/showpost.php?p=3819708&postcount=508

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you are subscribed to this thread.

ElleKayEm commented 2 years ago

Kindle serial numbers don't work on books from any version of the Kindle app.

rkrug commented 2 years ago

The KFX format can only be decrypted if it was downloaded with Kindle for Mac 1.26 or earlier.

Since you have E-ink Kindles, I suggest downloading your books from the website and choosing one of those Kindles for the device.

Or you can disable KFX downloads from Kindle for Mac with method 2 here: https://www.mobileread.com/forums/showthread.php?t=283371

Also see: https://www.mobileread.com/forums/showpost.php?p=3819708&postcount=508

OK - I tried downloading, but it is not really feasible with more than 500 books - I can not download wore than one book at a time from the Amazon website. Or am I missing something?

rkrug commented 2 years ago

The disabling only works for version 1.31 and below, but the recent version is 1.34.

ElleKayEm commented 2 years ago

No, no bulk download from the website. And yes you would need to get an earlier version of Kindle for Mac -- and prevent it from updating. I think you would also need to download those one at a time in the app to avoid getting KFX format -- but I'm not sure about that. If one of your Kindles is older -- running firmware prior to 5.6.5 (August 2015) -- you can get non-KFX format books directly from it.

TuxSH commented 2 years ago

Just downgrade your K4Mac version to 1.26, it still works...

Blocking updates can be done by chmod 000 the updates folder, see: https://www.mobileread.com/forums/showthread.php?t=334278&page=2

codrutpopescu commented 2 years ago

It happens for me as well, but I think it's architecture related. When I try to customize the plugin I get: calibre, version 5.42.0 ERROR: Unhandled exception: OSError:dlopen(/usr/local/lib/libcrypto.dylib, 0x0006): tried: '/usr/local/lib/libcrypto.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libcrypto.1.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))

calibre 5.42 embedded-python: True is64bit: True macOS-10.16-x86_64-i386-64bit Darwin ('64bit', '') ('Darwin', '21.4.0', 'Darwin Kernel Version 21.4.0: Fri Mar 18 00:47:26 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T8101') Python 3.8.5 OSX: ('10.16', ('', '', ''), 'x86_64') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 48, 0) && DeDRM (10, 0, 2) && Package KFX (from KFX Input) (1, 48, 0) && KFX metadata reader (from KFX Input) (1, 48, 0) && KFX Input (1, 48, 0) Traceback (most recent call last): File "calibre/gui2/preferences/plugins.py", line 302, in customize_plugin File "calibre/gui2/preferences/plugins.py", line 380, in modify_plugin File "calibre/customize/init.py", line 166, in do_user_config File "calibre_plugins.dedrm.init", line 911, in config_widget import calibre_plugins.dedrm.config as config File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "calibre/customize/zipplugin.py", line 191, in exec_module File "calibre_plugins.dedrm.config", line 28, in from calibre_plugins.dedrm.utilities import uStrCmp File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "calibre/customize/zipplugin.py", line 191, in exec_module File "calibre_plugins.dedrm.utilities", line 4, in from calibre_plugins.dedrm.ignoblekeygen import generate_key File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "calibre/customize/zipplugin.py", line 191, in exec_module File "calibre_plugins.dedrm.ignoblekeygen", line 196, in AES = _load_crypto() File "calibre_plugins.dedrm.ignoblekeygen", line 190, in _load_crypto AES = loader() File "calibre_plugins.dedrm.ignoblekeygen", line 129, in _load_crypto_libcrypto libcrypto = CDLL(libcrypto) File "ctypes/init.py", line 373, in init OSError: dlopen(/usr/local/lib/libcrypto.dylib, 0x0006): tried: '/usr/local/lib/libcrypto.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libcrypto.1.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))

bestlem commented 2 years ago

@altitudedashboard How have you installed calibre? and libcrypto ? libcrypto in /usr/local should not be involved