anime-dl / anime-downloader

A simple but powerful anime downloader and streamer.
The Unlicense
1.93k stars 218 forks source link

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

Open ghost opened 2 years ago

ghost commented 2 years ago

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 -DESKTOP anime_downloader.util[68148] INFO anime-downloader 5.0.9 2022-06-16 15:23:21 -DESKTOP anime_downloader.util[68148] DEBUG Platform: Linux-5.10.121-1-MANJARO-x86_64-with-glibc2.35 2022-06-16 15:23:21 -DESKTOP anime_downloader.util[68148] DEBUG Python 3.10.5 Traceback (most recent call last): File "/home//.local/bin/anime", line 8, in sys.exit(main()) File "/home//.local/lib/python3.10/site-packages/anime_downloader/cli.py", line 53, in main cli() File "/home//.local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__ return self.main(*args, **kwargs) File "/home//.local/lib/python3.10/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/home//.local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home//.local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home//.local/lib/python3.10/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/home//.local/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, **kwargs) File "/home//.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//.local/lib/python3.10/site-packages/anime_downloader/util.py", line 86, in search cls = get_anime_class(provider) File "/home//.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 "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/home//.local/lib/python3.10/site-packages/anime_downloader/sites/twistmoe.py", line 1, in from Crypto.Cipher import AES File "/home//.local/lib/python3.10/site-packages/Crypto/Cipher/__init__.py", line 27, in from Crypto.Cipher._mode_ecb import _create_ecb_cipher File "/home//.local/lib/python3.10/site-packages/Crypto/Cipher/_mode_ecb.py", line 35, in raw_ecb_lib = load_pycryptodome_raw_lib("Crypto.Cipher._raw_ecb", """ File "/home//.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//.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' ```
h4rldev commented 2 years ago

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.