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

"cover:url" fails on v2.10.2 #82

Closed
snarkyyy opened this issue Jul 8, 2023 · 2 comments · Fixed by #83
Closed

"cover:url" fails on v2.10.2 #82

snarkyyy opened this issue Jul 8, 2023 · 2 comments · Fixed by #83
Labels
bug Something isn't working

Comments

@snarkyyy
Copy link

snarkyyy commented Jul 8, 2023

What happened ?

$ mangadex-dl "cover:https://mangadex.org/title/a6bfedbc-9846-4a97-9fcb-77a426d978e6/ubunchu" 
[ERROR] Unhandled exception, AttributeError: 'NoneType' object has no attribute 'id'
Traceback (most recent call last):
  File "./mangadex-downloader/mangadex_downloader/cli/__init__.py", line 73, in _main
    build_url(parser, args)
  File "./mangadex-downloader/mangadex_downloader/cli/url.py", line 238, in build_url
    result = command.prompt(args.input_pos)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "./mangadex-downloader/mangadex_downloader/cli/command.py", line 654, in prompt
    result = super().prompt(input_pos)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "./mangadex-downloader/mangadex_downloader/cli/command.py", line 273, in prompt
    return [answer.id]
            ^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'id'

I consistently get this error even with different urls.

What did you expect to happen ?

prompt which covers to download

OS version

Linux

App version

mangadex-downloader v2.10.2 (https://github.com/mansuf/mangadex-downloader)
Python: 3.11.3
arch: x64
bundled executable: no

Installation origin

git clone && python setup.py install

Installation origin (other sources)

No response

Reproducible command

mangadex-dl "cover:https://mangadex.org/title/a6bfedbc-9846-4a97-9fcb-77a426d978e6/ubunchu"

Additional context

The command works when I'm checked out on older version (v2.9.0) , which was the version that introduced the "cover:" feature.

@snarkyyy snarkyyy added the bug Something isn't working label Jul 8, 2023
@mansuf
Copy link
Owner

mansuf commented Jul 8, 2023

Starting from v2.10.x volume covers locale are now following --language value by default. It seems the manga didn't have English covers so it should throw error. But i forgot to put error handler for "cover" command for this case. Sorry about that.

NOTE: If you set --volume-cover-language, the covers will looking for locale from --volume-cover-language instead of --language

I've made PR #83 to fix this, you can test it by installing development version.

Installation with git + pip:

pip uninstall mangadex-downloader
pip install git+https://github.com/mansuf/mangadex-downloader.git@6d4e93b6acd104ca03bdc23d81c91bd7f3a7314e

Let me know if you have problem during installing and testing this patch 😉


If you want to show all covers, you can use all language

For example:

mangadex-dl "cover:https://mangadex.org/title/a6bfedbc-9846-4a97-9fcb-77a426d978e6/ubunchu" --language "all"

@snarkyyy
Copy link
Author

snarkyyy commented Jul 8, 2023

Thanks for a quick reply, I tested the patch and it seems to work

@snarkyyy snarkyyy closed this as completed Jul 8, 2023
mansuf added a commit that referenced this issue Jul 9, 2023
Fix "cover" command is failing
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.

2 participants