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
593 stars 23 forks source link

Installation failing on Ubuntu 24.04 #86

Closed zoof closed 1 month ago

zoof commented 1 month ago

Bug description

Installing the plugin fails with:

calibre, version 7.6.0
ERROR: Unhandled exception: <b>InvalidPlugin</b>:Initialization of plugin Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/customize/ui.py", line 710, in initialize_plugin
    p.initialize()
  File "calibre_plugins.deacsm.__init__", line 226, in initialize
    from libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest
  File "/home/user/Downloads/DeACSM_0.0.16.zip/libadobe.py", line 59, in &lt;module&gt;
    from oscrypto import keys
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/keys.py", line 5, in &lt;module&gt;
    from ._asymmetric import parse_certificate, parse_private, parse_public
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_asymmetric.py", line 27, in &lt;module&gt;
    from .kdf import pbkdf1, pbkdf2, pkcs12_kdf
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/kdf.py", line 9, in &lt;module&gt;
    from .util import rand_bytes
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/util.py", line 14, in &lt;module&gt;
    from ._openssl.util import rand_bytes
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/util.py", line 6, in &lt;module&gt;
    from ._libcrypto import libcrypto, libcrypto_version_info, handle_openssl_error
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto.py", line 24, in &lt;module&gt;
    from ._libcrypto_ctypes import (
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto_ctypes.py", line 47, in &lt;module&gt;
    raise LibraryNotFoundError('Error detecting the version of libcrypto')
oscrypto.errors.LibraryNotFoundError: Error detecting the version of libcrypto
 failed with traceback:
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/customize/ui.py", line 710, in initialize_plugin
    p.initialize()
  File "calibre_plugins.deacsm.__init__", line 226, in initialize
    from libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest
  File "/home/user/Downloads/DeACSM_0.0.16.zip/libadobe.py", line 59, in &lt;module&gt;
    from oscrypto import keys
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/keys.py", line 5, in &lt;module&gt;
    from ._asymmetric import parse_certificate, parse_private, parse_public
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_asymmetric.py", line 27, in &lt;module&gt;
    from .kdf import pbkdf1, pbkdf2, pkcs12_kdf
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/kdf.py", line 9, in &lt;module&gt;
    from .util import rand_bytes
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/util.py", line 14, in &lt;module&gt;
    from ._openssl.util import rand_bytes
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/util.py", line 6, in &lt;module&gt;
    from ._libcrypto import libcrypto, libcrypto_version_info, handle_openssl_error
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto.py", line 24, in &lt;module&gt;
    from ._libcrypto_ctypes import (
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto_ctypes.py", line 47, in &lt;module&gt;
    raise LibraryNotFoundError('Error detecting the version of libcrypto')
oscrypto.errors.LibraryNotFoundError: Error detecting the version of libcrypto

calibre 7.6  embedded-python: False
Linux-6.8.0-31-generic-x86_64-with-glibc2.39 Linux ('64bit', 'ELF')
('Linux', '6.8.0-31-generic', '#31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024')
Python 3.12.3
Interface language: None
EXE path: /usr/bin/python3.12
Successfully initialized third party plugins: DeDRM (10, 0, 3)
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/customize/ui.py", line 710, in initialize_plugin
    p.initialize()
  File "calibre_plugins.deacsm.__init__", line 226, in initialize
    from libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest
  File "/home/user/Downloads/DeACSM_0.0.16.zip/libadobe.py", line 59, in <module>
    from oscrypto import keys
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/keys.py", line 5, in <module>
    from ._asymmetric import parse_certificate, parse_private, parse_public
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_asymmetric.py", line 27, in <module>
    from .kdf import pbkdf1, pbkdf2, pkcs12_kdf
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/kdf.py", line 9, in <module>
    from .util import rand_bytes
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/util.py", line 14, in <module>
    from ._openssl.util import rand_bytes
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/util.py", line 6, in <module>
    from ._libcrypto import libcrypto, libcrypto_version_info, handle_openssl_error
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto.py", line 24, in <module>
    from ._libcrypto_ctypes import (
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto_ctypes.py", line 47, in <module>
    raise LibraryNotFoundError('Error detecting the version of libcrypto')
oscrypto.errors.LibraryNotFoundError: Error detecting the version of libcrypto

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 520, in add_plugin
    plugin = initialize_plugin(plugin, path_to_zip_file, PluginInstallationType.EXTERNAL)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/calibre/calibre/customize/ui.py", line 715, 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 710, in initialize_plugin
    p.initialize()
  File "calibre_plugins.deacsm.__init__", line 226, in initialize
    from libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest
  File "/home/user/Downloads/DeACSM_0.0.16.zip/libadobe.py", line 59, in <module>
    from oscrypto import keys
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/keys.py", line 5, in <module>
    from ._asymmetric import parse_certificate, parse_private, parse_public
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_asymmetric.py", line 27, in <module>
    from .kdf import pbkdf1, pbkdf2, pkcs12_kdf
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/kdf.py", line 9, in <module>
    from .util import rand_bytes
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/util.py", line 14, in <module>
    from ._openssl.util import rand_bytes
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/util.py", line 6, in <module>
    from ._libcrypto import libcrypto, libcrypto_version_info, handle_openssl_error
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto.py", line 24, in <module>
    from ._libcrypto_ctypes import (
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto_ctypes.py", line 47, in <module>
    raise LibraryNotFoundError('Error detecting the version of libcrypto')
oscrypto.errors.LibraryNotFoundError: Error detecting the version of libcrypto
 failed with traceback:
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/customize/ui.py", line 710, in initialize_plugin
    p.initialize()
  File "calibre_plugins.deacsm.__init__", line 226, in initialize
    from libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest
  File "/home/user/Downloads/DeACSM_0.0.16.zip/libadobe.py", line 59, in <module>
    from oscrypto import keys
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/keys.py", line 5, in <module>
    from ._asymmetric import parse_certificate, parse_private, parse_public
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_asymmetric.py", line 27, in <module>
    from .kdf import pbkdf1, pbkdf2, pkcs12_kdf
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/kdf.py", line 9, in <module>
    from .util import rand_bytes
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/util.py", line 14, in <module>
    from ._openssl.util import rand_bytes
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/util.py", line 6, in <module>
    from ._libcrypto import libcrypto, libcrypto_version_info, handle_openssl_error
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto.py", line 24, in <module>
    from ._libcrypto_ctypes import (
  File "/home/user/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto_ctypes.py", line 47, in <module>
    raise LibraryNotFoundError('Error detecting the version of libcrypto')
oscrypto.errors.LibraryNotFoundError: Error detecting the version of libcrypto

Operating system

Linux

Which version of Calibre are you running?

7.6.0

Which version of the ACSM Input plugin are you running?

v0.0.16

Import type

No response

Further information

No response

Leseratte10 commented 1 month ago

Ubuntu 24.04 comes with Openssl3, which is not yet supported in 0.0.16 of the plugin. Unfortunately I still haven't had time to finalize the new update 0.1.0.

You can either download the 0.1.0 beta from github, or a fixed version of 0.0.16 that should run on Ubuntu 24.04 from Mobileread: https://www.mobileread.com/forums/attachment.php?attachmentid=203511&d=1693734139

zoof commented 1 month ago

Neither option seems to work for me. Trying to install the plugin gives me:

calibre, version 7.6.0
ERROR: Unhandled exception: <b>InvalidPlugin</b>:Initialization of plugin Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/customize/ui.py", line 710, 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 710, 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 7.6  embedded-python: False
Linux-6.8.0-31-generic-x86_64-with-glibc2.39 Linux ('64bit', 'ELF')
('Linux', '6.8.0-31-generic', '#31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024')
Python 3.12.3
Interface language: None
EXE path: /usr/bin/python3.12
Successfully initialized third party plugins: DeDRM (10, 0, 3)
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/customize/ui.py", line 710, 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 520, in add_plugin
    plugin = initialize_plugin(plugin, path_to_zip_file, PluginInstallationType.EXTERNAL)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/calibre/calibre/customize/ui.py", line 715, 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 710, 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 710, 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'
Leseratte10 commented 1 month ago

Can you try fully removing the plugin, then restart Calibre, then try to install it again?

zoof commented 1 month ago

Ah, that worked, thank you!