Leseratte10 / acsm-calibre-plugin

Calibre plugin for ACSM->EPUB and ACSM->PDF conversion.
https://www.mobileread.com/forums/showthread.php?t=341975
GNU General Public License v3.0
695 stars 24 forks source link

Installing DeACSM failes on Fedora 40 #99

Closed naxi0815 closed 3 months ago

naxi0815 commented 3 months ago

Bug description

Installing DeACSM via Extensions in Calibre 7.13 failes with the following Details: `calibre, version 7.13.0 FEHLER: Erweiterungsinstallation fehlgeschlagen: Während der Installation der Erweiterung ist ein Problem aufgetreten. Diese Erweiterung wird nun entfernt. Bitte veröffentlichen Sie die folgende detaillierte Fehlermeldung im Diskussionsforum dieser Erweiterung und starten Sie Calibre neu.

Traceback (most recent call last): File "/tmp/calibre_7.13.0_tmp_91uelmv4/ojc73tr5.zip/libadobe.py", line 23, in from Cryptodome import Random File "/app/lib64/calibre/calibre/constants.py", line 220, in find_spec return ModuleSpec(fullname, DeVendorLoader(fullname.replace('dome', '', 1))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/lib64/calibre/calibre/constants.py", line 189, in init self.aliased_module = import_module(aliased_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.12/importlib/init.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'Crypto'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/lib64/calibre/calibre/customize/ui.py", line 722, in initialize_plugin p.initialize() File "calibre_plugins.deacsm.init", line 226, in initialize from libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest File "/tmp/calibre_7.13.0_tmp_91uelmv4/ojc73tr5.zip/libadobe.py", line 29, in from Crypto import Random ModuleNotFoundError: No module named 'Crypto'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/lib64/calibre/calibre/gui2/dialogs/plugin_updater.py", line 741, in _install_clicked plugin = add_plugin(zip_path) ^^^^^^^^^^^^^^^^^^^^ File "/app/lib64/calibre/calibre/customize/ui.py", line 532, in add_plugin plugin = initialize_plugin(plugin, path_to_zip_file, PluginInstallationType.EXTERNAL) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/lib64/calibre/calibre/customize/ui.py", line 727, in initializeplugin raise InvalidPlugin((('Initialization of plugin %s failed with traceback:') calibre.customize.InvalidPlugin: Initialisierung der Erweiterung Traceback (most recent call last): File "/tmp/calibre_7.13.0_tmp_91uelmv4/ojc73tr5.zip/libadobe.py", line 23, in from Cryptodome import Random File "/app/lib64/calibre/calibre/constants.py", line 220, in find_spec return ModuleSpec(fullname, DeVendorLoader(fullname.replace('dome', '', 1))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/lib64/calibre/calibre/constants.py", line 189, in init self.aliased_module = import_module(aliased_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.12/importlib/init.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'Crypto'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/lib64/calibre/calibre/customize/ui.py", line 722, in initialize_plugin p.initialize() File "calibre_plugins.deacsm.init", line 226, in initialize from libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest File "/tmp/calibre_7.13.0_tmp_91uelmv4/ojc73tr5.zip/libadobe.py", line 29, in from Crypto import Random ModuleNotFoundError: No module named 'Crypto' fehlgeschlagen. Rückverfolgung: Traceback (most recent call last): File "/tmp/calibre_7.13.0_tmp_91uelmv4/ojc73tr5.zip/libadobe.py", line 23, in from Cryptodome import Random File "/app/lib64/calibre/calibre/constants.py", line 220, in find_spec return ModuleSpec(fullname, DeVendorLoader(fullname.replace('dome', '', 1))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/lib64/calibre/calibre/constants.py", line 189, in init self.aliased_module = import_module(aliased_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.12/importlib/init.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'Crypto'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/lib64/calibre/calibre/customize/ui.py", line 722, in initialize_plugin p.initialize() File "calibre_plugins.deacsm.init", line 226, in initialize from libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest File "/tmp/calibre_7.13.0_tmp_91uelmv4/ojc73tr5.zip/libadobe.py", line 29, in from Crypto import Random ModuleNotFoundError: No module named 'Crypto'

`

Operating system

Linux

Which version of Calibre are you running?

7.13

Which version of the ACSM Input plugin are you running?

v0.0.16

Import type

No response

Further information

Tested with rpm and flatpak version. Both fail with the same error.

Leseratte10 commented 3 months ago

Flatpaks or other calibre versions coming from the Linux distribution are quite often causing issues with plugins. Would you mind trying the Calibre version straight from their website, using the installer, and see if that works?

naxi0815 commented 3 months ago

With the Calibre version straight from their website it works. Although I am not happy with manually install and maintain software it seems the way to go.

peterjeschke commented 1 month ago

If you found this on google, this issue can be fixed by installing the python module crypto globally. E.g. on Fedora: sudo dnf install python3-crypto python3-oscrypto. You can probably also try installing the module using sudo pip install crypto, but I didn't test it and don't recommend it if a package from your distribution is available.