noDRM / DeDRM_tools

DeDRM tools for ebooks
7.04k stars 314 forks source link

DRM not removed - calibre 7.3 DeDRM 10.0.3 #476

Closed eyerxa closed 8 months ago

eyerxa commented 8 months ago

Question / bug report

Running KFM 1.33, and I installed the KFX plugin, DeDRM ad Obok plugins without issue. Able to load azw file into calibre no problem, but get 'book has DRM' error when try to convert to epub.

I'm really stuck as to why I can't get this to work, any help is appreciated.

Which version of Calibre are you running?

7.3.0

Which version of the DeDRM plugin are you running?

v10.0.3

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

1.33.0

Log output

Using calibre Qt style: True
ApplicationPaletteChange event received
ApplicationPaletteChange event received
ApplicationPaletteChange event received
ApplicationPaletteChange event received
ApplicationPaletteChange event received
ApplicationPaletteChange event received
ApplicationPaletteChange event received
ApplicationPaletteChange event received
ApplicationPaletteChange event received
ApplicationPaletteChange event received
ApplicationPaletteChange event received
ApplicationPaletteChange event received
ApplicationPaletteChange event received
ApplicationPaletteChange event received
2024-01-17 23:13:17.635 calibre-debug[62867:4650290] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
qt.gui.imageio: libpng warning: iCCP: known incorrect sRGB profile
calibre Debug log
calibre 7.3  embedded-python: True
macOS-14.1.2-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '23.1.0', 'Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64')
Python 3.11.5
OSX: ('14.1.2', ('', '', ''), 'x86_64')
Interface language: None
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 7, 0) && DeDRM (10, 0, 3) && Package KFX (from KFX Input) (2, 7, 0) && KFX metadata reader (from KFX Input) (2, 7, 0) && From KFX (2, 7, 0) && KFX Input (2, 7, 0) && Obok DeDRM (10, 0, 3)
calibre 7.3  embedded-python: True
macOS-14.1.2-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '23.1.0', 'Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64')
Python 3.11.5
OSX: ('14.1.2', ('', '', ''), 'x86_64')
Interface language: None
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 7, 0) && DeDRM (10, 0, 3) && Package KFX (from KFX Input) (2, 7, 0) && KFX metadata reader (from KFX Input) (2, 7, 0) && From KFX (2, 7, 0) && KFX Input (2, 7, 0) && Obok DeDRM (10, 0, 3)
QPA platform: cocoa
devicePixelRatio: 1.0
logicalDpi: 72.0 x 72.0
physicalDpi: 72.00000108133152 x 72.00000108133152
[0.00] Starting up...
[0.02] Showing splash screen...
[0.21] splash screen shown
[0.21] Initializing db...
[0.22] db initialized
[0.22] 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.57] GUI main window shown
[1.64] main UI initialized...
[1.64] Hiding splash screen
Failed to request permission for showing notification: The operation couldn’t be completed. (UNErrorDomain error 1.)
[22.56] splash screen hidden
[22.56] Started up in 22.56 seconds with 2 books
Worker Launch took: 0.04 seconds
Job: 0 Convert book 1 of 1 (Children of Fallen Gods (The War of Lost Hearts Book 2)) finished
Convert book 1 of 1 (Children of Fallen Gods (The War of Lost Hearts Book 2))
    DeDRM v10.0.3: Trying to decrypt 8w_7pi10.kfx-zip
    Using Library AlfCrypto Python
    Decrypting KFX-ZIP ebook: 8w_7pi10
    Found 0 keys to try after 0.2 seconds
    Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.745f7184-bde1-417d-9e29-4a6eecf68fe2.voucher
    Traceback (most recent call last):
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 105, in decrypt_voucher
        voucher.decryptvoucher()
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/ion.py", line 886, in decryptvoucher
        b = pkcs7unpad(b, 16)
            ^^^^^^^^^^^^^^^^^
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/ion.py", line 762, in pkcs7unpad
        _assert(paddinglen > 0 and paddinglen <= blocklen, "Incorrect padding - Wrong key")
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/ion.py", line 102, in _assert
        raise Exception(msg)
    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
    Found k4Mac kinf2018 file: /Users/Erin/Library/Application Support/Kindle/storage/.kinf2018
    trying username  b'Erin'  on file  /Users/Erin/Library/Application Support/Kindle/storage/.kinf2018
    trying IDString: b'a5813e95c14e'
    trying IDString: b'275fcf1522a4'
    trying IDString: b'55bd3d9bb5fa'
    Decrypted key file using IDString '55bd3d9bb5fa' and UserName 'Erin'
    DeDRM v10.0.3: Found 1 new key
    Decrypting KFX-ZIP ebook: 8w_7pi10
    Got DSN key from database key_0
    Found 1 keys to try after 1.0 seconds
    Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.745f7184-bde1-417d-9e29-4a6eecf68fe2.voucher
    Traceback (most recent call last):
      File "calibre_plugins.dedrm.__init__", line 957, in KindleMobiDecrypt
        book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/k4mobidedrm.py", line 261, in GetDecryptedBook
        mb.processBook(totalpids)
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 67, in processBook
        self.decrypt_voucher(totalpids)
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 111, 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 "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 105, in decrypt_voucher
        voucher.decryptvoucher()
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/ion.py", line 886, in decryptvoucher
        b = pkcs7unpad(b, 16)
            ^^^^^^^^^^^^^^^^^
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/ion.py", line 762, in pkcs7unpad
        _assert(paddinglen > 0 and paddinglen <= blocklen, "Incorrect padding - Wrong key")
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/ion.py", line 102, in _assert
        raise Exception(msg)
    Exception: Incorrect padding - Wrong key
    Traceback (most recent call last):
      File "calibre_plugins.dedrm.__init__", line 957, in KindleMobiDecrypt
        book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/k4mobidedrm.py", line 261, in GetDecryptedBook
        mb.processBook(totalpids)
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 67, in processBook
        self.decrypt_voucher(totalpids)
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 111, 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 "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 105, in decrypt_voucher
        voucher.decryptvoucher()
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/ion.py", line 886, in decryptvoucher
        b = pkcs7unpad(b, 16)
            ^^^^^^^^^^^^^^^^^
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/ion.py", line 762, in pkcs7unpad
        _assert(paddinglen > 0 and paddinglen <= blocklen, "Incorrect padding - Wrong key")
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/ion.py", line 102, in _assert
        raise Exception(msg)
    Exception: Incorrect padding - Wrong key
    Traceback (most recent call last):
      File "calibre_plugins.dedrm.__init__", line 957, in KindleMobiDecrypt
        book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/k4mobidedrm.py", line 261, in GetDecryptedBook
        mb.processBook(totalpids)
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 67, in processBook
        self.decrypt_voucher(totalpids)
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 111, 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.__init__", line 991, in KindleMobiDecrypt
        book = k4mobidedrm.GetDecryptedBook(path_to_ebook,newkeys.items(),[],[],[],self.starttime)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/k4mobidedrm.py", line 261, in GetDecryptedBook
        mb.processBook(totalpids)
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 67, in processBook
        self.decrypt_voucher(totalpids)
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 111, in decrypt_voucher
        raise Exception("Failed to decrypt KFX DRM voucher with any key")
    Exception: Failed to decrypt KFX DRM voucher with any key
    DeDRM v10.0.3: Ultimately failed to decrypt after 1.0 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md
    Running file type plugin DeDRM failed with traceback:
    Traceback (most recent call last):
      File "calibre_plugins.dedrm.__init__", line 957, in KindleMobiDecrypt
        book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/k4mobidedrm.py", line 261, in GetDecryptedBook
        mb.processBook(totalpids)
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 67, in processBook
        self.decrypt_voucher(totalpids)
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 111, 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 187, in _run_filetype_plugins
      File "calibre_plugins.dedrm.__init__", line 1056, in run
        decrypted_ebook = self.KindleMobiDecrypt(path_to_ebook)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "calibre_plugins.dedrm.__init__", line 1007, in KindleMobiDecrypt
        raise DeDRMError("{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime))
    calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.3: Ultimately failed to decrypt after 1.0 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md
    Conversion options changed from defaults:
      output_profile: 'kobo'
      read_metadata_from_opf: '/var/folders/ny/_mzpxf9n0q339nnpjzcc9m3h0000gn/C/calibre_7.3.0_tmp_8jd8wpz1/lefcpfvi.opf'
      cover: '/var/folders/ny/_mzpxf9n0q339nnpjzcc9m3h0000gn/C/calibre_7.3.0_tmp_8jd8wpz1/at76d2ai.jpeg'
      verbose: 2
      allow_conversion_with_errors: True
    Resolved conversion options
    calibre version: 7.3.0
    {'allow_conversion_with_errors': True,
     '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/ny/_mzpxf9n0q339nnpjzcc9m3h0000gn/C/calibre_7.3.0_tmp_8jd8wpz1/at76d2ai.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 0x118948590>,
     '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.KoboReaderOutput object at 0x11c6fe990>,
     '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/ny/_mzpxf9n0q339nnpjzcc9m3h0000gn/C/calibre_7.3.0_tmp_8jd8wpz1/lefcpfvi.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 8w_7pi10.kfx-zip
    Decrypting KFX-ZIP ebook: 8w_7pi10
    Found 0 keys to try after 0.0 seconds
    Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.745f7184-bde1-417d-9e29-4a6eecf68fe2.voucher
    Traceback (most recent call last):
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 105, in decrypt_voucher
        voucher.decryptvoucher()
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/ion.py", line 886, in decryptvoucher
        b = pkcs7unpad(b, 16)
            ^^^^^^^^^^^^^^^^^
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/ion.py", line 762, in pkcs7unpad
        _assert(paddinglen > 0 and paddinglen <= blocklen, "Incorrect padding - Wrong key")
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/ion.py", line 102, in _assert
        raise Exception(msg)
    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.0 seconds
    Found k4Mac kinf2018 file: /Users/Erin/Library/Application Support/Kindle/storage/.kinf2018
    trying username  b'Erin'  on file  /Users/Erin/Library/Application Support/Kindle/storage/.kinf2018
    trying IDString: b'a5813e95c14e'
    trying IDString: b'275fcf1522a4'
    trying IDString: b'55bd3d9bb5fa'
    Decrypted key file using IDString '55bd3d9bb5fa' and UserName 'Erin'
    DeDRM v10.0.3: Found 1 new key
    Decrypting KFX-ZIP ebook: 8w_7pi10
    Got DSN key from database key_0
    Found 1 keys to try after 0.7 seconds
    Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.745f7184-bde1-417d-9e29-4a6eecf68fe2.voucher
    Traceback (most recent call last):
      File "calibre_plugins.dedrm.__init__", line 957, in KindleMobiDecrypt
        book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/k4mobidedrm.py", line 261, in GetDecryptedBook
        mb.processBook(totalpids)
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 67, in processBook
        self.decrypt_voucher(totalpids)
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 111, 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 "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 105, in decrypt_voucher
        voucher.decryptvoucher()
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/ion.py", line 886, in decryptvoucher
        b = pkcs7unpad(b, 16)
            ^^^^^^^^^^^^^^^^^
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/ion.py", line 762, in pkcs7unpad
        _assert(paddinglen > 0 and paddinglen <= blocklen, "Incorrect padding - Wrong key")
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/ion.py", line 102, in _assert
        raise Exception(msg)
    Exception: Incorrect padding - Wrong key
    Traceback (most recent call last):
      File "calibre_plugins.dedrm.__init__", line 957, in KindleMobiDecrypt
        book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/k4mobidedrm.py", line 261, in GetDecryptedBook
        mb.processBook(totalpids)
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 67, in processBook
        self.decrypt_voucher(totalpids)
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 111, 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 "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 105, in decrypt_voucher
        voucher.decryptvoucher()
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/ion.py", line 886, in decryptvoucher
        b = pkcs7unpad(b, 16)
            ^^^^^^^^^^^^^^^^^
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/ion.py", line 762, in pkcs7unpad
        _assert(paddinglen > 0 and paddinglen <= blocklen, "Incorrect padding - Wrong key")
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/ion.py", line 102, in _assert
        raise Exception(msg)
    Exception: Incorrect padding - Wrong key
    Traceback (most recent call last):
      File "calibre_plugins.dedrm.__init__", line 957, in KindleMobiDecrypt
        book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/k4mobidedrm.py", line 261, in GetDecryptedBook
        mb.processBook(totalpids)
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 67, in processBook
        self.decrypt_voucher(totalpids)
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 111, 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.__init__", line 991, in KindleMobiDecrypt
        book = k4mobidedrm.GetDecryptedBook(path_to_ebook,newkeys.items(),[],[],[],self.starttime)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/k4mobidedrm.py", line 261, in GetDecryptedBook
        mb.processBook(totalpids)
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 67, in processBook
        self.decrypt_voucher(totalpids)
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 111, in decrypt_voucher
        raise Exception("Failed to decrypt KFX DRM voucher with any key")
    Exception: Failed to decrypt KFX DRM voucher with any key
    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
        book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/k4mobidedrm.py", line 261, in GetDecryptedBook
        mb.processBook(totalpids)
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 67, in processBook
        self.decrypt_voucher(totalpids)
      File "/Users/Erin/Library/Preferences/calibre/plugins/DeDRM.zip/kfxdedrm.py", line 111, 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 187, in _run_filetype_plugins
      File "calibre_plugins.dedrm.__init__", line 1056, in run
        decrypted_ebook = self.KindleMobiDecrypt(path_to_ebook)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "calibre_plugins.dedrm.__init__", line 1007, in KindleMobiDecrypt
        raise DeDRMError("{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime))
    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
    InputFormatPlugin: KFX Input running
    on /var/folders/ny/_mzpxf9n0q339nnpjzcc9m3h0000gn/C/calibre_7.3.0_tmp_8jd8wpz1/8w_7pi10.kfx-zip
    Software versions: KFX Input 2.7.0, calibre 7.3, macOS-14.1.2-x86_64-i386-64bit
    KFX Input plugin help is available at https://www.mobileread.com/forums/showthread.php?t=291290
    Converting /var/folders/ny/_mzpxf9n0q339nnpjzcc9m3h0000gn/C/calibre_7.3.0_tmp_8jd8wpz1/8w_7pi10.kfx-zip
    Processing container: B083P1NSVC_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 B083P1NSVC_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 41, in <module>
      File "site.py", line 37, 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 121, in convert
    calibre.ebooks.DRMError: This book has DRM!
ElleKayEm commented 8 months ago

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

Kudos6505 commented 8 months ago

I had a similar problem with DeDRM 10.0.3. DeDRM 10.0.9 works perfectly.

ElleKayEm commented 8 months ago

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

eyerxa commented 8 months ago

Yup! This solved my issue. You can close this.

Erin Matheson @.***

On Fri, Feb 2, 2024 at 5:02 PM ElleKayEm @.***> wrote:

@eyerxa https://github.com/eyerxa If you're all set, you can close the issue.

— Reply to this email directly, view it on GitHub https://github.com/noDRM/DeDRM_tools/issues/476#issuecomment-1924921038, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZOTXGLEUFILDOEAEMMAOBLYRV5ALAVCNFSM6AAAAABB7W7YV6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRUHEZDCMBTHA . You are receiving this because you were mentioned.Message ID: @.***>

ElleKayEm commented 8 months ago

I can't.

eyerxa commented 8 months ago

Oh duh, of course. Sorry about that!