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 load native module 'Crypto.Cipher._raw_ecb' #739

Open
ghost opened this issue Jun 16, 2022 · 1 comment
Open

Cannot load native module 'Crypto.Cipher._raw_ecb' #739

ghost opened this issue Jun 16, 2022 · 1 comment

Comments

@ghost
Copy link

ghost commented Jun 16, 2022

Attempting to download 'hunter x hunter 2011 (Dub)' from various sites results in the following error code:

ERROR: Cannot load native module 'Crypto.Cipher._raw_ecb': Not found '_raw_ecb.cpython-310-x86_64-linux-gnu.so', Cannot load '_raw_ecb.abi3.so': cannot load library '/home//.local/lib/python3.10/site-packages/Crypto/Util/../Cipher/_raw_ecb.abi3.so': /home//.local/lib/python3.10/site-packages/Crypto/Util/../Cipher/_raw_ecb.abi3.so: failed to map segment from shared object. Additionally, ctypes.util.find_library() did not manage to locate a library called '/home//.local/lib/python3.10/site-packages/Crypto/Util/../Cipher/_raw_ecb.abi3.so', Not found '_raw_ecb.so'

To reproduce

py ~/.local/bin/anime dl 'https://kissanimes.pro/anime/hunter-x-hunter-2011-dub-/12189/'
LOG
2022-06-16 15:23:21 <user>-DESKTOP anime_downloader.util[68148] INFO anime-downloader 5.0.9
2022-06-16 15:23:21 <user>-DESKTOP anime_downloader.util[68148] DEBUG Platform: Linux-5.10.121-1-MANJARO-x86_64-with-glibc2.35
2022-06-16 15:23:21 <user>-DESKTOP anime_downloader.util[68148] DEBUG Python 3.10.5
Traceback (most recent call last):
  File "/home/<user>/.local/bin/anime", line 8, in <module>
    sys.exit(main())
  File "/home/<user>/.local/lib/python3.10/site-packages/anime_downloader/cli.py", line 53, in main
    cli()
  File "/home/<user>/.local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/<user>/.local/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/<user>/.local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/<user>/.local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/<user>/.local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/<user>/.local/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/<user>/.local/lib/python3.10/site-packages/anime_downloader/commands/dl.py", line 109, in command
    anime_url, _ = util.search(anime_url, provider, choice)
  File "/home/<user>/.local/lib/python3.10/site-packages/anime_downloader/util.py", line 86, in search
    cls = get_anime_class(provider)
  File "/home/<user>/.local/lib/python3.10/site-packages/anime_downloader/sites/init.py", line 67, in get_anime_class
    module = import_module(
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/<user>/.local/lib/python3.10/site-packages/anime_downloader/sites/twistmoe.py", line 1, in <module>
    from Crypto.Cipher import AES
  File "/home/<user>/.local/lib/python3.10/site-packages/Crypto/Cipher/__init__.py", line 27, in <module>
    from Crypto.Cipher._mode_ecb import _create_ecb_cipher
  File "/home/<user>/.local/lib/python3.10/site-packages/Crypto/Cipher/_mode_ecb.py", line 35, in <module>
    raw_ecb_lib = load_pycryptodome_raw_lib("Crypto.Cipher._raw_ecb", """
  File "/home/<user>/.local/lib/python3.10/site-packages/Crypto/Util/_raw_api.py", line 309, in load_pycryptodome_raw_lib
    raise OSError("Cannot load native module '%s': %s" % (name, ", ".join(attempts)))
OSError: Cannot load native module 'Crypto.Cipher._raw_ecb': Not found '_raw_ecb.cpython-310-x86_64-linux-gnu.so', Cannot load '_raw_ecb.abi3.so': cannot load library '/home/<user>/.local/lib/python3.10/site-packages/Crypto/Util/../Cipher/_raw_ecb.abi3.so': /home/<user>/.local/lib/python3.10/site-packages/Crypto/Util/../Cipher/_raw_ecb.abi3.so: failed to map segment from shared object.  Additionally, ctypes.util.find_library() did not manage to locate a library called '/home/<user>/.local/lib/python3.10/site-packages/Crypto/Util/../Cipher/_raw_ecb.abi3.so', Not found '_raw_ecb.so'


@h4rldev
Copy link

h4rldev commented Jun 19, 2022

Try reinstalling pycryptodome

Or switch to animdl:
https://github.com/justfoolingaround/animdl

anime-dl has been abandoned (to the most part)
So that's why I added anim-dl as a choice of action.

You could also wait 'til the rewrite of anime-dl's anime downloader is actually finished or you could keep on using this.

@anime-dl anime-dl deleted a comment from apurbow Sep 12, 2022
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

1 participant