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

ModuleNotFoundError: No module named 'libadobe' #72

Closed
alexreg opened this issue Nov 19, 2023 · 11 comments · Fixed by #88
Closed

ModuleNotFoundError: No module named 'libadobe' #72

alexreg opened this issue Nov 19, 2023 · 11 comments · Fixed by #88
Labels
bug Something isn't working

Comments

@alexreg
Copy link

alexreg commented Nov 19, 2023

Bug description

To reproduce:

  1. Clone Git repo.
  2. Run bundle_calibre_plugin.sh script.
  3. Install plugin calibre-plugin.zip in Calibre.
  4. Observe the following error. (Full log below.)
Initialization of plugin Traceback (most recent call last):
  File "calibre/customize/ui.py", line 710, in initialize_plugin
  File "calibre_plugins.deacsm.__init__", line 288, in initialize
    from libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest
ModuleNotFoundError: No module named 'libadobe'

Operating system

MacOS

Which version of Calibre are you running?

7.0.0

Which version of the ACSM Input plugin are you running?

Git master branch

Import type

No response

Further information

calibre, version 7.0.0
ERROR: Unhandled exception: <b>InvalidPlugin</b>:Initialization of plugin Traceback (most recent call last):
  File "calibre/customize/ui.py", line 710, in initialize_plugin
  File "calibre_plugins.deacsm.__init__", line 288, in initialize
    from libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest
ModuleNotFoundError: No module named 'libadobe'
 failed with traceback:
Traceback (most recent call last):
  File "calibre/customize/ui.py", line 710, in initialize_plugin
  File "calibre_plugins.deacsm.__init__", line 288, in initialize
    from libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest
ModuleNotFoundError: No module named 'libadobe'


calibre 7.0  embedded-python: True
macOS-14.1-arm64-arm-64bit Darwin ('64bit', '')
('Darwin', '23.1.0', 'Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:24 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6000')
Python 3.11.5
OSX: ('14.1', ('', '', ''), 'arm64')
Interface language: None
Successfully initialized third party plugins: DeDRM (10, 0, 9) && Obok DeDRM (10, 0, 9) && ACSM Input Plugin GUI Extension (0, 1, 0)
Traceback (most recent call last):
  File "calibre/customize/ui.py", line 710, in initialize_plugin
  File "calibre_plugins.deacsm.__init__", line 288, in initialize
    from libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest
ModuleNotFoundError: No module named 'libadobe'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "calibre/gui2/preferences/plugins.py", line 325, in add_plugin
  File "calibre/customize/ui.py", line 520, in add_plugin
  File "calibre/customize/ui.py", line 715, in initialize_plugin
calibre.customize.InvalidPlugin: Initialization of plugin Traceback (most recent call last):
  File "calibre/customize/ui.py", line 710, in initialize_plugin
  File "calibre_plugins.deacsm.__init__", line 288, in initialize
    from libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest
ModuleNotFoundError: No module named 'libadobe'
 failed with traceback:
Traceback (most recent call last):
  File "calibre/customize/ui.py", line 710, in initialize_plugin
  File "calibre_plugins.deacsm.__init__", line 288, in initialize
    from libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest
ModuleNotFoundError: No module named 'libadobe'

@Leseratte10
Copy link
Owner

Did you have a previous version of the plugin installed or is this a clean install?
Does this also happen after restarting Calibre?

@Leseratte10 Leseratte10 added the bug Something isn't working label Nov 19, 2023
@alexreg
Copy link
Author

alexreg commented Nov 19, 2023

Clean install. And yes, happens after restarting, I'm afraid.

@maneatingduck
Copy link

I got the same error when trying a clean install of the plugin (never used it before) with calibre portable 7.1.0.

I downgraded calibre to 6.29 portable, and the plugin installed without errors and works fine.

Wonderful plugin btw, thanks for maintaining it :)

@Leseratte10
Copy link
Owner

Interesting. Are you on MacOS as well?

I don't think I have tested a clean install on Calibre 7 yet, I've just updated from 6.x and made sure it still works.

@maneatingduck
Copy link

maneatingduck commented Nov 27, 2023

I'm on Windows 11.
Edit: I upgraded calibre to 7.1.0 again, plugin still works.

@alexreg
Copy link
Author

alexreg commented Nov 27, 2023

Error still occurs for me on Calibre 7.1 on macOS.

@Leseratte10
Copy link
Owner

Interesting. I completely removed the plugin from Calibre, updated 7.1, installed it again, and it still just worked fine (on Linux). I'm going to set up a VM to try a clean new install of Calibre 7.1 where it was never installed in the past.

@vasi
Copy link
Contributor

vasi commented May 10, 2024

I'm experiencing the same issue on FreeBSD. It looks like the plugin zip file is not being added to sys.path, while on Linux it is, and I'm really not sure why.

Anyhow I think the correct way to load modules within a plugin is with the magic prefix, eg: calibre_plugins.deacsm.libadobe. If I change all imports to look like that, it works fine! But then the test fails of course. Let me see if there's a way to fix that.

@vasi
Copy link
Contributor

vasi commented May 10, 2024

Welp, the tests don't run on FreeBSD anyhow, because there's no legacy algorithm support in libcrypto. It looks like the tests use rc2-cbc-pkcs5.

@alexreg
Copy link
Author

alexreg commented May 10, 2024

Any update on this yet?

@alexreg
Copy link
Author

alexreg commented May 12, 2024

Works nicely for me now, I'm glad to say; thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants