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

AttributeError: 'str' object has no attribute 'name' in language attribute #125

Open
Dkirk25 opened this issue Jan 6, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@Dkirk25
Copy link

Dkirk25 commented Jan 6, 2025

What happened ?

When I tried to run the program with the following command, an error is thrown when it tries to download the manga titles like One Man Punch or One Piece:

python -m mangadex_downloader "d8a959f7-648e-4c8d-8f23-f1f3f8e129f3" -ngn -uct -noc --delay-requests 6.0 --save-as pdf-volume --path ./manga/

I also tried to append the --lang "English" at the end of the command and I received the same result.

python -m mangadex_downloader "a1c7c817-4e59-43b7-9365-09675a149a6f" -ngn -uct -noc --delay-requests 6.0 --save-as pdf-volume --path ./manga/

Error:

[INFO] Checking url = https://mangadex.org/title/d8a959f7-648e-4c8d-8f23-f1f3f8e129f3/one-punch-man
[INFO] Using English language
[INFO] Fetching all chapters...
[INFO] Fetching all chapters...
[INFO] Fetching all chapters...
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/mangadex_downloader/cli/__init__.py", line 110, in _main
    download(args)
  File "/usr/local/lib/python3.11/site-packages/mangadex_downloader/cli/download.py", line 34, in download
    url(args, args.type)
  File "/usr/local/lib/python3.11/site-packages/mangadex_downloader/cli/url.py", line 199, in __call__
    self.func(self.id, args)
  File "/usr/local/lib/python3.11/site-packages/mangadex_downloader/cli/url.py", line 113, in download_manga
    dl_manga(*args)
  File "/usr/local/lib/python3.11/site-packages/mangadex_downloader/main.py", line 86, in download
    manga.fetch_chapters(lang.value, all_chapters=True)
  File "/usr/local/lib/python3.11/site-packages/mangadex_downloader/manga.py", line 305, in fetch_chapters
    self._chapters = MangaChapter(self, lang, chapter, all_chapters)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/mangadex_downloader/chapter.py", line 713, in __init__
    self._parse_volumes()
  File "/usr/local/lib/python3.11/site-packages/mangadex_downloader/chapter.py", line 737, in _parse_volumes
    f"Manga '{self.manga.title}' with {self.language.name} "
                                       ^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'name'
2025-01-06 14:21:15,108 - ERROR - Error during manga download for one-punch-man: Command '['python3', '-m', 'mangadex_downloader', 'https://mangadex.org/title/d8a959f7-648e-4c8d-8f23-f1f3f8e129f3/one-punch-man', '-ngn', '-uct', '-noc', '--dns-over-https', 'cloudflare', '--delay-requests', '6.0', '--save-as', 'pdf-volume', '--path', './manga/One Punch-Man']' returned non-zero exit status ```


### What did you expect to happen ?

That the manga books would download correctly like most others.

### OS version

Mac/linux

### App version

v3.0.0b

### Installation origin

PyPI (Python Package Index)

### Installation origin (other sources)

pip install -U --no-cache-dir git+https://github.com/mansuf/mangadex-downloader.git@bca2570a0f7195daf57e0fc25de9f4e964fa8562

### Reproducible command

python -m mangadex_downloader "d8a959f7-648e-4c8d-8f23-f1f3f8e129f3" -ngn -uct -noc --delay-requests 6.0 --save-as pdf-volume --path ./manga/

### Additional context

_No response_
@Dkirk25 Dkirk25 added the bug Something isn't working label Jan 6, 2025
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

No branches or pull requests

1 participant