Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kindle DRM Removal Fails #53

Closed
arctic289spice opened this issue Mar 12, 2022 · 2 comments
Closed

Kindle DRM Removal Fails #53

arctic289spice opened this issue Mar 12, 2022 · 2 comments

Comments

@arctic289spice
Copy link

Question / bug report

Running calibre on linux, all plugins and software are up to date, but still fails to decrypt DRM.

Which version of Calibre are you running?

5.33.2

Which version of the DeDRM plugin are you running?

v10.0.2

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

5.14.1 (Kindle Paperwhite 10th Gen)

Log output

calibre Debug log
calibre 5.33.2 embedded-python: False is64bit: True
Linux-5.16.12-200.fc35.x86_64-x86_64-with-glibc2.34 Linux ('64bit', 'ELF')
('Linux', '5.16.12-200.fc35.x86_64', '#1 SMP PREEMPT Wed Mar 2 19:06:17 UTC 2022')
Python 3.10.2
Interface language: None
Successfully initialized third party plugins: DeDRM (10, 0, 2)
calibre 5.33.2 embedded-python: False is64bit: True
Linux-5.16.12-200.fc35.x86_64-x86_64-with-glibc2.34 Linux ('64bit', 'ELF')
('Linux', '5.16.12-200.fc35.x86_64', '#1 SMP PREEMPT Wed Mar 2 19:06:17 UTC 2022')
Python 3.10.2
Interface language: None
Successfully initialized third party plugins: DeDRM (10, 0, 2)
Turning on automatic hidpi scaling
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 168.1655172413793 x 161.36470588235292
Using calibre Qt style: True
[0.00] Starting up...
[0.00] Showing splash screen...
[0.03] splash screen shown
[0.03] Initializing db...
[0.03] db initialized
[0.03] Constructing main UI...
[1.03] main UI initialized...
[1.03] Hiding splash screen
Starting QuickView
DeDRM v10.0.2: Trying to decrypt Dune.azw3
Using Library AlfCrypto DLL/DYLIB/SO
Using Library AlfCrypto DLL/DYLIB/SO
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_5.33.2_tmp_xrrzorgr/v46h_2v2plugin_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/lib64/calibre/calibre/customize/ui.py", line 175, in _run_filetype_plugins
nfp = plugin.run(nfp) or nfp
File "calibre_plugins.dedrm.init", line 888, in run
decrypted_ebook = self.KindleMobiDecrypt(path_to_ebook)
File "calibre_plugins.dedrm.init", line 782, in KindleMobiDecrypt
import calibre_plugins.dedrm.k4mobidedrm
File "/usr/lib64/calibre/calibre/customize/zipplugin.py", line 191, in exec_module
exec(compiled, module.dict)
File "calibre_plugins.dedrm.k4mobidedrm", line 88, in
from calibre_plugins.dedrm import kfxdedrm
File "/usr/lib64/calibre/calibre/customize/zipplugin.py", line 191, 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/lib64/calibre/calibre/customize/zipplugin.py", line 191, 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'
[9.49] splash screen hidden
[9.49] Started up in 9.49 seconds with 0 books
Added Dune to db in: 0.2
Added 1 books in 1.2 seconds
Worker Launch took: 0.00 seconds
Job: 0 Convert book 1 of 1 (Dune) finished
Convert book 1 of 1 (Dune)
DeDRM v10.0.2: Trying to decrypt y8j7zqzc.azw3
Using Library AlfCrypto DLL/DYLIB/SO
Using Library AlfCrypto DLL/DYLIB/SO
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_5.33.2_tmp_xrrzorgr/m2xo3ozcplugin_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/lib64/calibre/calibre/customize/ui.py", line 175, in _run_filetype_plugins
    nfp = plugin.run(nfp) or nfp
  File "calibre_plugins.dedrm.__init__", line 888, in run
    decrypted_ebook = self.KindleMobiDecrypt(path_to_ebook)
  File "calibre_plugins.dedrm.__init__", line 782, in KindleMobiDecrypt
    import calibre_plugins.dedrm.k4mobidedrm
  File "/usr/lib64/calibre/calibre/customize/zipplugin.py", line 191, in exec_module
    exec(compiled, module.__dict__)
  File "calibre_plugins.dedrm.k4mobidedrm", line 88, in <module>
    from calibre_plugins.dedrm import kfxdedrm
  File "/usr/lib64/calibre/calibre/customize/zipplugin.py", line 191, in exec_module
    exec(compiled, module.__dict__)
  File "calibre_plugins.dedrm.kfxdedrm", line 20, in <module>
    from calibre_plugins.dedrm.ion import DrmIon, DrmIonVoucher
  File "/usr/lib64/calibre/calibre/customize/zipplugin.py", line 191, in exec_module
    exec(compiled, module.__dict__)
  File "calibre_plugins.dedrm.ion", line 33, in <module>
    from Crypto.Cipher import AES
ModuleNotFoundError: No module named 'Crypto'
Conversion options changed from defaults:
  read_metadata_from_opf: '/tmp/calibre_5.33.2_tmp_xrrzorgr/jx6n1k3b.opf'
  verbose: 2
  cover: '/tmp/calibre_5.33.2_tmp_xrrzorgr/k14_mk7y.jpeg'
  output_profile: 'kindle'
Resolved conversion options
calibre version: 5.33.2
{'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_5.33.2_tmp_xrrzorgr/k14_mk7y.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 0x7fe710f2ace0>,
 '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.KindleOutput object at 0x7fe710f283a0>,
 '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_5.33.2_tmp_xrrzorgr/jx6n1k3b.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.2: Trying to decrypt y8j7zqzc.azw3
Running file type plugin DeDRM failed with traceback:
Traceback (most recent call last):
  File "calibre_plugins.dedrm.kfxdedrm", line 18, in <module>
    from ion import DrmIon, DrmIonVoucher
  File "/tmp/calibre_5.33.2_tmp_xrrzorgr/otfejwygplugin_unzip/ion.py", line 33, in <module>
    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/lib64/calibre/calibre/customize/ui.py", line 175, in _run_filetype_plugins
    nfp = plugin.run(nfp) or nfp
  File "calibre_plugins.dedrm.__init__", line 888, in run
    decrypted_ebook = self.KindleMobiDecrypt(path_to_ebook)
  File "calibre_plugins.dedrm.__init__", line 782, in KindleMobiDecrypt
    import calibre_plugins.dedrm.k4mobidedrm
  File "/usr/lib64/calibre/calibre/customize/zipplugin.py", line 191, in exec_module
    exec(compiled, module.__dict__)
  File "calibre_plugins.dedrm.k4mobidedrm", line 88, in <module>
    from calibre_plugins.dedrm import kfxdedrm
  File "/usr/lib64/calibre/calibre/customize/zipplugin.py", line 191, in exec_module
    exec(compiled, module.__dict__)
  File "calibre_plugins.dedrm.kfxdedrm", line 20, in <module>
    from calibre_plugins.dedrm.ion import DrmIon, DrmIonVoucher
  File "/usr/lib64/calibre/calibre/customize/zipplugin.py", line 191, in exec_module
    exec(compiled, module.__dict__)
  File "calibre_plugins.dedrm.ion", line 33, in <module>
    from Crypto.Cipher import AES
ModuleNotFoundError: No module named 'Crypto'
InputFormatPlugin: MOBI Input running
on /tmp/calibre_5.33.2_tmp_xrrzorgr/y8j7zqzc.azw3
Found KF8 MOBI of type 'standalone'
Traceback (most recent call last):
  File "/usr/bin/calibre-parallel", line 21, in <module>
    sys.exit(main())
  File "/usr/lib64/calibre/calibre/utils/ipc/worker.py", line 215, in main
    result = func(*args, **kwargs)
  File "/usr/lib64/calibre/calibre/gui2/convert/gui_conversion.py", line 41, in gui_convert_override
    gui_convert(input, output, recommendations, notification=notification,
  File "/usr/lib64/calibre/calibre/gui2/convert/gui_conversion.py", line 28, in gui_convert
    plumber.run()
  File "/usr/lib64/calibre/calibre/ebooks/conversion/plumber.py", line 1111, in run
    self.oeb = self.input_plugin(stream, self.opts,
  File "/usr/lib64/calibre/calibre/customize/conversion.py", line 244, in __call__
    ret = self.convert(stream, options, file_ext,
  File "/usr/lib64/calibre/calibre/ebooks/conversion/plugins/mobi_input.py", line 44, in convert
    opf = os.path.abspath(mr())
  File "/usr/lib64/calibre/calibre/ebooks/mobi/reader/mobi8.py", line 85, in __call__
    self.mobi6_reader.check_for_drm()
  File "/usr/lib64/calibre/calibre/ebooks/mobi/reader/mobi6.py", line 162, in check_for_drm
    raise DRMError(name)
calibre.ebooks.DRMError: Dune
@ElleKayEm
Copy link

Try the official Linux calibre: https://calibre-ebook.com/download_linux

@arctic289spice
Copy link
Author

That did it, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants