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

Cannot install due to "no attribute 'DeACSM_Prefs'" error #111

Open
gstalnaker opened this issue Oct 25, 2024 · 4 comments
Open

Cannot install due to "no attribute 'DeACSM_Prefs'" error #111

gstalnaker opened this issue Oct 25, 2024 · 4 comments

Comments

@gstalnaker
Copy link

Bug description

Attempting to install - I've used multiple downloads from the "official" latest v0.0.16, to other downloads found in various submitted issues/comments and from the source using build bundle. All produce this error.

Error Log

calibre, version 6.13.0
ERROR: Unhandled exception: <b>InvalidPlugin</b>:Initialization of plugin Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/customize/ui.py", line 677, in initialize_plugin
    p.initialize()
  File "calibre_plugins.deacsm.__init__", line 232, in initialize
    deacsmprefs = prefs.DeACSM_Prefs()
                  ^^^^^^^^^^^^^^^^^^
AttributeError: module 'calibre_plugins.deacsm.prefs' has no attribute 'DeACSM_Prefs'
 failed with traceback:
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/customize/ui.py", line 677, in initialize_plugin
    p.initialize()
  File "calibre_plugins.deacsm.__init__", line 232, in initialize
    deacsmprefs = prefs.DeACSM_Prefs()
                  ^^^^^^^^^^^^^^^^^^
AttributeError: module 'calibre_plugins.deacsm.prefs' has no attribute 'DeACSM_Prefs'


calibre 6.13  embedded-python: False
Linux-6.11.3-3-liquorix-amd64-x86_64-with-glibc2.36 Linux ('64bit', 'ELF')
('Linux', '6.11.3-3-liquorix-amd64', '#1 ZEN SMP PREEMPT liquorix 6.11-5~mx23ahs (2024-10-15)')
Python 3.11.2
Interface language: None
Successfully initialized third party plugins: DeDRM (7, 2, 1) && EpubCheck (0, 2, 5) && Kindle Collections (1, 7, 29) && Kobo Books (1, 9, 2) && Kobo Utilities (2, 17, 2) && KoboTouchExtended (3, 7, 0)
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/customize/ui.py", line 677, in initialize_plugin
    p.initialize()
  File "calibre_plugins.deacsm.__init__", line 232, in initialize
    deacsmprefs = prefs.DeACSM_Prefs()
                  ^^^^^^^^^^^^^^^^^^
AttributeError: module 'calibre_plugins.deacsm.prefs' has no attribute 'DeACSM_Prefs'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/gui2/preferences/plugins.py", line 325, in add_plugin
    plugin = add_plugin(path)
             ^^^^^^^^^^^^^^^^
  File "/usr/lib/calibre/calibre/customize/ui.py", line 487, in add_plugin
    plugin = initialize_plugin(plugin, path_to_zip_file, PluginInstallationType.EXTERNAL)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/calibre/calibre/customize/ui.py", line 682, in initialize_plugin
    raise InvalidPlugin((_('Initialization of plugin %s failed with traceback:')
calibre.customize.InvalidPlugin: Initialization of plugin Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/customize/ui.py", line 677, in initialize_plugin
    p.initialize()
  File "calibre_plugins.deacsm.__init__", line 232, in initialize
    deacsmprefs = prefs.DeACSM_Prefs()
                  ^^^^^^^^^^^^^^^^^^
AttributeError: module 'calibre_plugins.deacsm.prefs' has no attribute 'DeACSM_Prefs'
 failed with traceback:
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/customize/ui.py", line 677, in initialize_plugin
    p.initialize()
  File "calibre_plugins.deacsm.__init__", line 232, in initialize
    deacsmprefs = prefs.DeACSM_Prefs()
                  ^^^^^^^^^^^^^^^^^^
AttributeError: module 'calibre_plugins.deacsm.prefs' has no attribute 'DeACSM_Prefs'

Operating system

Linux

Which version of Calibre are you running?

6.13

Which version of the ACSM Input plugin are you running?

v0.0.16, etc.

Import type

No response

Further information

Linux distro is MXLinux v23.4, KDE

@Leseratte10
Copy link
Owner

This is one of the reasons why I still haven't fully released the 0.1.0 builds yet - there's issues when updating from 0.0.16 to 0.1.0 sometimes.

You'll need to uninstall the plugin, then restart Calibre twice and only then install the beta to clean up the mess.

@gstalnaker
Copy link
Author

Almost got it -- could not install the v0.0.16 version available through the Calibre PlugIns UI, but DID successfully install the v0.1.0 you've made available on another issue here. Created the anonymous AdobeID to use. Unfortunately I have been unsuccessful in adding any .ascm file book to my Calibre installation. I get an item in the Calibre library that is the .ascm file itself and not the book. I think there is another issue that is about this, so I'll go look at it and see if you've provided guidance there. Thanks!

@JohnJayMcKaye
Copy link

JohnJayMcKaye commented Jan 29, 2025

same with Calibre Flatpak @ Fedora 41

calibre, version 7.20.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.20.0_tmp_6f5ti8ih/bxkx18ag.zip/libadobe.py", line 23, in <module>
    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.13/importlib/__init__.py", line 88, 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 724, 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.20.0_tmp_6f5ti8ih/bxkx18ag.zip/libadobe.py", line 29, in <module>
    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 534, in add_plugin
    plugin = initialize_plugin(plugin, path_to_zip_file, PluginInstallationType.EXTERNAL)
  File "/app/lib64/calibre/calibre/customize/ui.py", line 729, in initialize_plugin
    raise InvalidPlugin((_('Initialization of plugin %s failed with traceback:')
                        %tb) + '\n'+tb)
calibre.customize.InvalidPlugin: Initialisierung der Erweiterung Traceback (most recent call last):
  File "/tmp/calibre_7.20.0_tmp_6f5ti8ih/bxkx18ag.zip/libadobe.py", line 23, in <module>
    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.13/importlib/__init__.py", line 88, 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 724, 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.20.0_tmp_6f5ti8ih/bxkx18ag.zip/libadobe.py", line 29, in <module>
    from Crypto import Random
ModuleNotFoundError: No module named 'Crypto'
 fehlgeschlagen. Rückverfolgung:
Traceback (most recent call last):
  File "/tmp/calibre_7.20.0_tmp_6f5ti8ih/bxkx18ag.zip/libadobe.py", line 23, in <module>
    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.13/importlib/__init__.py", line 88, 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 724, 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.20.0_tmp_6f5ti8ih/bxkx18ag.zip/libadobe.py", line 29, in <module>
    from Crypto import Random
ModuleNotFoundError: No module named 'Crypto'

@doctor-beat
Copy link

This is one of the reasons why I still haven't fully released the 0.1.0 builds yet - there's issues when updating from 0.0.16 to 0.1.0 sometimes.

You'll need to uninstall the plugin, then restart Calibre twice and only then install the beta to clean up the mess.

True, on Ubuntu 24.04 + Calibre 7.6 this was the case for me: i had all of the mentioned issues (libcrypto not found, DEASMC_prefs not found , etc) but downloading the latest beta from build #226 AND cleaning out .config/calibre/plugins/ACSMInput AND restarting calibre multiple times fixed the install for me.

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

4 participants