anime-dl / anime-downloader

A simple but powerful anime downloader and streamer.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error messages if not using default provider

thereal-Stiven opened this issue · comments

Describe the bug

I started creating a Docker container in which anime DL would run, everything works fine except for when I try to change the provider.

To reproduce

root@9db640099248:/home/Anime# anime dl "golden boy" -p animestar
LOG
anime --log-level DEBUG "golden boy" -p animestar


Traceback (most recent call last):
  File "/usr/local/bin/anime", line 11, in <module>
    load_entry_point('anime-downloader==5.0.14', 'console_scripts', 'anime')()
  File "/usr/local/lib/python3.8/dist-packages/anime_downloader-5.0.14-py3.8.egg/anime_downloader/cli.py", line 81, in main
    cli()
  File "/usr/local/lib/python3.8/dist-packages/click-8.0.1-py3.8.egg/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click-8.0.1-py3.8.egg/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/click-8.0.1-py3.8.egg/click/core.py", line 1662, in invoke
    cmd_name, cmd, args = self.resolve_command(ctx, args)
  File "/usr/local/lib/python3.8/dist-packages/click-8.0.1-py3.8.egg/click/core.py", line 1709, in resolve_command
    cmd = self.get_command(ctx, cmd_name)
  File "/usr/local/lib/python3.8/dist-packages/anime_downloader-5.0.14-py3.8.egg/anime_downloader/cli.py", line 51, in get_command
    command = importlib.import_module(
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'anime_downloader.commands.golden boy'
  • Dockerfile
FROM ubuntu
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y curl
RUN apt-get install -y wget
RUN apt-get install -y git
RUN apt-get install -y python3
RUN apt-get install -y python3-pip python3-dev \
  && cd /usr/local/bin \
  && ln -s /usr/bin/python3 python \
  && pip3 --no-cache-dir install --upgrade pip \
  && rm -rf /var/lib/apt/lists/*
RUN cd home \
  && git clone https://github.com/anime-dl/anime-downloader.git \
  && cd anime-downloader \
  && python3 setup.py install \
  && mkdir /home/Anime

uhhh
the command in the code-block is correct
but the command in the log is not

anime --log-level DEBUG "golden boy" -p animestar
it should be anime --log-level DEBUG dl "golden boy" -p animestar

oh i am sorry, here

root@e5cc82cabfe6:/home/Anime# anime --log-level DEBUG dl "golden boy" -p animestar
2021-08-25 22:37:35 e5cc82cabfe6 anime_downloader.util[64] INFO anime-downloader 5.0.14
2021-08-25 22:37:35 e5cc82cabfe6 anime_downloader.util[64] DEBUG Platform: Linux-5.10.52-v7+-armv7l-with-glibc2.29
2021-08-25 22:37:35 e5cc82cabfe6 anime_downloader.util[64] DEBUG Python 3.8.10
Traceback (most recent call last):
  File "/usr/local/bin/anime", line 11, in <module>
    load_entry_point('anime-downloader==5.0.14', 'console_scripts', 'anime')()
  File "/usr/local/lib/python3.8/dist-packages/anime_downloader-5.0.14-py3.8.egg/anime_downloader/cli.py", line 81, in main
    cli()
  File "/usr/local/lib/python3.8/dist-packages/click-8.0.1-py3.8.egg/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click-8.0.1-py3.8.egg/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/click-8.0.1-py3.8.egg/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/dist-packages/click-8.0.1-py3.8.egg/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/dist-packages/click-8.0.1-py3.8.egg/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click-8.0.1-py3.8.egg/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/anime_downloader-5.0.14-py3.8.egg/anime_downloader/commands/dl.py", line 109, in command
    anime_url, _ = util.search(anime_url, provider, choice)
  File "/usr/local/lib/python3.8/dist-packages/anime_downloader-5.0.14-py3.8.egg/anime_downloader/util.py", line 94, in search
    cls = get_anime_class(provider)
  File "/usr/local/lib/python3.8/dist-packages/anime_downloader-5.0.14-py3.8.egg/anime_downloader/sites/init.py", line 71, in get_anime_class
    module = import_module(
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/local/lib/python3.8/dist-packages/anime_downloader-5.0.14-py3.8.egg/anime_downloader/sites/animestar.py", line 10, in <module>
    _headers = get_random_header() | { 'X-Requested-By': 'animestar-web'}
TypeError: unsupported operand type(s) for |: 'dict' and 'dict'

Yeah uhh...it's a problem specific to that provider.