apprenticeharper / DeDRM_tools

DeDRM tools for ebooks
14.55k stars 1.52k forks source link

Calibre Plug-in isn't working #2371

Closed Taydevil closed 1 month ago

Taydevil commented 1 month ago

CheckList


Calibre Plug-in isn't working I'm trying to open a kindle book. It's a azw3 file I downloaded from amazon.com to copy by usb.

Linux mint

Calibre: 7.6.0

Kindle: 8th generation

DeDRM: 7.2.1

Log

Log Title ```log taylor@taylor-MacBookPro:~$ calibre-debug -g calibre 7.6 embedded-python: False Linux-6.8.0-47-generic-x86_64-with-glibc2.39 Linux ('64bit', 'ELF') ('Linux', '6.8.0-47-generic', '#47-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 27 21:40:26 UTC 2024') Python 3.12.3 Interface language: None EXE path: /usr/bin/python3.12 Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 16, 0) && DeDRM (7, 2, 1) && Package KFX (from KFX Input) (2, 16, 0) && Amazon.com Multiple Countries (1, 0, 0) && KFX metadata reader (from KFX Input) (2, 16, 0) && From KFX (2, 16, 0) && KFX Input (2, 16, 0) && Obok DeDRM (7, 2, 1) QPA platform: xcb devicePixelRatio: 2.0 logicalDpi: 96.0 x 96.0 physicalDpi: 113.67832167832168 x 113.51955307262568 ApplicationPaletteChange event ignored Using calibre Qt style: True [0.00] Starting up... [0.01] Showing splash screen... [0.06] splash screen shown [0.06] Initializing db... [0.10] db initialized [0.10] 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 calibre_plugins.obok_dedrm.obok.obok:473: SyntaxWarning: invalid escape sequence '\s' calibre_plugins.obok_dedrm.obok.obok:473: SyntaxWarning: invalid escape sequence '\-' calibre_plugins.obok_dedrm.obok.obok:473: SyntaxWarning: invalid escape sequence '\s' calibre_plugins.obok_dedrm.obok.obok:480: SyntaxWarning: invalid escape sequence '\s' calibre_plugins.obok_dedrm.obok.obok:480: SyntaxWarning: invalid escape sequence '\s' calibre_plugins.obok_dedrm.obok.obok:490: SyntaxWarning: invalid escape sequence '\s' calibre_plugins.obok_dedrm.obok.obok:490: SyntaxWarning: invalid escape sequence '\s' calibre_plugins.obok_dedrm.obok.obok:497: SyntaxWarning: invalid escape sequence '\s' calibre_plugins.obok_dedrm.obok.obok:497: SyntaxWarning: invalid escape sequence '\s' calibre_plugins.obok_dedrm.obok.obok:715: SyntaxWarning: invalid escape sequence '\s' DEBUG: 0.0 obok::action_err.py - loading translations qt.gui.imageio: libpng warning: iCCP: known incorrect sRGB profile [1.14] GUI main window shown [1.19] main UI initialized... [1.19] Hiding splash screen [1.35] splash screen hidden [1.35] Started up in 1.35 seconds with 0 books DeDRM v7.2.1: Trying to decrypt Terrapin.azw3 Using Library AlfCrypto DLL/DYLIB/SO Using Library AlfCrypto DLL/DYLIB/SO /tmp/calibre_7.6.0_tmp_gr8qfsyg/sdyfdv9xplugin_unzip/ion.py:794: SyntaxWarning: invalid escape sequence '\}' "V9708": (0x05, b'\x1diIm\x08a\x17\x1e!am\x1d\x1aQ.\x16!\x06*\}x04\x11\t\x06\x04?'), calibre_plugins.dedrm.ion:794: SyntaxWarning: invalid escape sequence '\}' Running file type plugin DeDRM failed with traceback: Traceback (most recent call last): File "calibre_plugins.dedrm.kfxdedrm", line 18, in from ion import DrmIon, DrmIonVoucher File "/tmp/calibre_7.6.0_tmp_gr8qfsyg/sdyfdv9xplugin_unzip/ion.py", line 33, in from Crypto.Cipher import AES ModuleNotFoundError: No module named 'Crypto' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/calibre/calibre/customize/ui.py", line 187, in _run_filetype_plugins nfp = plugin.run(nfp) or nfp ^^^^^^^^^^^^^^^ File "calibre_plugins.dedrm.__init__", line 633, in run decrypted_ebook = self.KindleMobiDecrypt(path_to_ebook) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "calibre_plugins.dedrm.__init__", line 527, in KindleMobiDecrypt import calibre_plugins.dedrm.k4mobidedrm File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 207, in exec_module exec(compiled, module.__dict__) File "calibre_plugins.dedrm.k4mobidedrm", line 88, in from calibre_plugins.dedrm import kfxdedrm File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 207, in exec_module exec(compiled, module.__dict__) File "calibre_plugins.dedrm.kfxdedrm", line 20, in from calibre_plugins.dedrm.ion import DrmIon, DrmIonVoucher File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 207, in exec_module exec(compiled, module.__dict__) File "calibre_plugins.dedrm.ion", line 33, in from Crypto.Cipher import AES ModuleNotFoundError: No module named 'Crypto' Added Terrapin to db in: 0.3 Added 1 books in 0.9 seconds Worker Launch took: 0.02 seconds Job: 0 Convert book 1 of 1 (Terrapin) finished Convert book 1 of 1 (Terrapin) DeDRM v7.2.1: Trying to decrypt by4wh3_s.azw3 Using Library AlfCrypto DLL/DYLIB/SO Using Library AlfCrypto DLL/DYLIB/SO /tmp/calibre_7.6.0_tmp_gr8qfsyg/rf3s25uqplugin_unzip/ion.py:794: SyntaxWarning: invalid escape sequence '\}' "V9708": (0x05, b'\x1diIm\x08a\x17\x1e!am\x1d\x1aQ.\x16!\x06*\}x04\x11\t\x06\x04?'), calibre_plugins.dedrm.ion:794: SyntaxWarning: invalid escape sequence '\}' Running file type plugin DeDRM failed with traceback: Traceback (most recent call last): File "calibre_plugins.dedrm.kfxdedrm", line 18, in from ion import DrmIon, DrmIonVoucher File "/tmp/calibre_7.6.0_tmp_gr8qfsyg/rf3s25uqplugin_unzip/ion.py", line 33, in from Crypto.Cipher import AES ModuleNotFoundError: No module named 'Crypto' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/calibre/calibre/customize/ui.py", line 187, in _run_filetype_plugins nfp = plugin.run(nfp) or nfp ^^^^^^^^^^^^^^^ File "calibre_plugins.dedrm.__init__", line 633, in run decrypted_ebook = self.KindleMobiDecrypt(path_to_ebook) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "calibre_plugins.dedrm.__init__", line 527, in KindleMobiDecrypt import calibre_plugins.dedrm.k4mobidedrm File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 207, in exec_module exec(compiled, module.__dict__) File "calibre_plugins.dedrm.k4mobidedrm", line 88, in from calibre_plugins.dedrm import kfxdedrm File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 207, in exec_module exec(compiled, module.__dict__) File "calibre_plugins.dedrm.kfxdedrm", line 20, in from calibre_plugins.dedrm.ion import DrmIon, DrmIonVoucher File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 207, in exec_module exec(compiled, module.__dict__) File "calibre_plugins.dedrm.ion", line 33, in from Crypto.Cipher import AES ModuleNotFoundError: No module named 'Crypto' Conversion options changed from defaults: output_profile: 'tablet' cover: '/tmp/calibre_7.6.0_tmp_gr8qfsyg/xxhrmj0p.jpeg' read_metadata_from_opf: '/tmp/calibre_7.6.0_tmp_gr8qfsyg/mu4minoq.opf' verbose: 2 Resolved conversion options calibre version: 7.6.0 {'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': '/tmp/calibre_7.6.0_tmp_gr8qfsyg/xxhrmj0p.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': , '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': , 'page_breaks_before': "//*[name()='h1' or name()='h2']", 'prefer_metadata_cover': False, 'preserve_cover_aspect_ratio': False, 'pretty_print': True, 'pubdate': None, 'publisher': None, 'rating': None, 'read_metadata_from_opf': '/tmp/calibre_7.6.0_tmp_gr8qfsyg/mu4minoq.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 v7.2.1: Trying to decrypt by4wh3_s.azw3 /tmp/calibre_7.6.0_tmp_gr8qfsyg/9x2ylrbxplugin_unzip/ion.py:794: SyntaxWarning: invalid escape sequence '\}' "V9708": (0x05, b'\x1diIm\x08a\x17\x1e!am\x1d\x1aQ.\x16!\x06*\}x04\x11\t\x06\x04?'), calibre_plugins.dedrm.ion:794: SyntaxWarning: invalid escape sequence '\}' "V9708": (0x05, b'\x1diIm\x08a\x17\x1e!am\x1d\x1aQ.\x16!\x06*\}x04\x11\t\x06\x04?'), Running file type plugin DeDRM failed with traceback: Traceback (most recent call last): File "calibre_plugins.dedrm.kfxdedrm", line 18, in from ion import DrmIon, DrmIonVoucher File "/tmp/calibre_7.6.0_tmp_gr8qfsyg/9x2ylrbxplugin_unzip/ion.py", line 33, in from Crypto.Cipher import AES ModuleNotFoundError: No module named 'Crypto' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/calibre/calibre/customize/ui.py", line 187, in _run_filetype_plugins nfp = plugin.run(nfp) or nfp ^^^^^^^^^^^^^^^ File "calibre_plugins.dedrm.__init__", line 633, in run decrypted_ebook = self.KindleMobiDecrypt(path_to_ebook) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "calibre_plugins.dedrm.__init__", line 527, in KindleMobiDecrypt import calibre_plugins.dedrm.k4mobidedrm File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 207, in exec_module exec(compiled, module.__dict__) File "calibre_plugins.dedrm.k4mobidedrm", line 88, in from calibre_plugins.dedrm import kfxdedrm File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 207, in exec_module exec(compiled, module.__dict__) File "calibre_plugins.dedrm.kfxdedrm", line 20, in from calibre_plugins.dedrm.ion import DrmIon, DrmIonVoucher File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 207, in exec_module exec(compiled, module.__dict__) File "calibre_plugins.dedrm.ion", line 33, in from Crypto.Cipher import AES ModuleNotFoundError: No module named 'Crypto' InputFormatPlugin: MOBI Input running on /tmp/calibre_7.6.0_tmp_gr8qfsyg/by4wh3_s.azw3 Found KF8 MOBI of type 'standalone' Traceback (most recent call last): File "/usr/bin/calibre-parallel", line 21, in sys.exit(main()) ^^^^^^ File "/usr/lib/calibre/calibre/utils/ipc/worker.py", line 215, in main result = func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/calibre/calibre/gui2/convert/gui_conversion.py", line 38, in gui_convert_override gui_convert(input, output, recommendations, notification=notification, File "/usr/lib/calibre/calibre/gui2/convert/gui_conversion.py", line 25, in gui_convert plumber.run() File "/usr/lib/calibre/calibre/ebooks/conversion/plumber.py", line 1108, in run self.oeb = self.input_plugin(stream, self.opts, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/calibre/calibre/customize/conversion.py", line 242, in __call__ ret = self.convert(stream, options, file_ext, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/calibre/calibre/ebooks/conversion/plugins/mobi_input.py", line 44, in convert opf = os.path.abspath(mr()) ^^^^ File "/usr/lib/calibre/calibre/ebooks/mobi/reader/mobi8.py", line 85, in __call__ self.mobi6_reader.check_for_drm() File "/usr/lib/calibre/calibre/ebooks/mobi/reader/mobi6.py", line 162, in check_for_drm raise DRMError(name) calibre.ebooks.DRMError: Terrapin ```
ElleKayEm commented 1 month ago

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

Also either install Pycryptodome or use the official Linux calibre: https://calibre-ebook.com/download_linux

Taydevil commented 1 month ago

Fixed it. Thanks!