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

v2.8.2 "--no-track" option throws unhanded exception #56

Closed
ScherisMarie opened this issue Mar 10, 2023 · 4 comments · Fixed by #57
Closed

v2.8.2 "--no-track" option throws unhanded exception #56

ScherisMarie opened this issue Mar 10, 2023 · 4 comments · Fixed by #57
Labels
bug Something isn't working

Comments

@ScherisMarie
Copy link

What happened ?

Didn't notice this before v2.8.2, so assuming this is a regression in the newest version.

The error log is included below:

[INFO] Checking url = https://mangadex.org/chapter/1e864547-08c0-405a-b465-1c6d32dfe7bd
[INFO] Found chapter None from manga "The girl I was interested in was a Two-Mouthed Youkai."
[INFO] Download directory is set to "/Users/scheris/Downloads/The girl I was interested in was a Two-Mouthed Youkai"
[INFO] Using raw format
[ERROR] Unhandled exception, AttributeError: 'NoneType' object has no attribute 'images'
Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.11/site-packages/mangadex_downloader/cli/__init__.py", line 73, in _main
    download(args)
  File "/opt/homebrew/lib/python3.11/site-packages/mangadex_downloader/cli/download.py", line 33, in download
    url(args, args.type)
  File "/opt/homebrew/lib/python3.11/site-packages/mangadex_downloader/cli/url.py", line 161, in __call__
    self.func(self.id, args)
  File "/opt/homebrew/lib/python3.11/site-packages/mangadex_downloader/cli/url.py", line 116, in download_chapter
    dl_chapter(*args)
  File "/opt/homebrew/lib/python3.11/site-packages/mangadex_downloader/main.py", line 206, in download_chapter
    fmt.main()
  File "/opt/homebrew/lib/python3.11/site-packages/mangadex_downloader/format/raw.py", line 59, in main
    for im_info in file_info.images:
                   ^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'images'

What did you expect to happen ?

Should have downloaded normally, like if I remove --no-track and it works as expected.

OS version

macOS 13.2.1 (M1)

App version

2.8.2

Installation origin

PyPI (Python Package Index)

Installation origin (other sources)

No response

Reproducible command

mangadex-dl --no-track --use-compressed-image https://mangadex.org/chapter/1e864547-08c0-405a-b465-1c6d32dfe7bd

Additional context

No response

@mansuf
Copy link
Owner

mansuf commented Mar 10, 2023

I have made a PR #57 to fix this issue. You can install this patch and test it. I will merge the PR once you're satisfied with the results

Installation:

pip install --no-cache-dir --upgrade git+https://github.com/mansuf/mangadex-downloader.git@12c469642963de9e9ba7cebc7c0e1bae83b06aad

@ScherisMarie
Copy link
Author

On my end, it's still throwing the same error after running the above command.

Below is the log of what happened when I ran the pip command:

scheris@scheriss-imac ~ % pip install --no-cache-dir --upgrade git+https://github.com/mansuf/mangadex-downloader.git@12c469642963de9e9ba7cebc7c0e1bae83b06aad
Collecting git+https://github.com/mansuf/mangadex-downloader.git@12c469642963de9e9ba7cebc7c0e1bae83b06aad
  Cloning https://github.com/mansuf/mangadex-downloader.git (to revision 12c469642963de9e9ba7cebc7c0e1bae83b06aad) to /private/var/folders/c4/hpybbzzx1vxbcrpwx6jy4_1m0000gn/T/pip-req-build-8slmyld6
  Running command git clone --filter=blob:none --quiet https://github.com/mansuf/mangadex-downloader.git /private/var/folders/c4/hpybbzzx1vxbcrpwx6jy4_1m0000gn/T/pip-req-build-8slmyld6
  Running command git rev-parse -q --verify 'sha^12c469642963de9e9ba7cebc7c0e1bae83b06aad'
  Running command git fetch -q https://github.com/mansuf/mangadex-downloader.git 12c469642963de9e9ba7cebc7c0e1bae83b06aad
  Running command git checkout -q 12c469642963de9e9ba7cebc7c0e1bae83b06aad
  Resolved https://github.com/mansuf/mangadex-downloader.git to commit 12c469642963de9e9ba7cebc7c0e1bae83b06aad
  Preparing metadata (setup.py) ... done
Requirement already satisfied: requests[socks] in /opt/homebrew/lib/python3.11/site-packages (from mangadex-downloader==2.8.2) (2.28.2)
Requirement already satisfied: tqdm in /opt/homebrew/lib/python3.11/site-packages (from mangadex-downloader==2.8.2) (4.65.0)
Requirement already satisfied: pathvalidate in /opt/homebrew/lib/python3.11/site-packages (from mangadex-downloader==2.8.2) (2.5.2)
Requirement already satisfied: packaging in /opt/homebrew/lib/python3.11/site-packages (from mangadex-downloader==2.8.2) (23.0)
Requirement already satisfied: pyjwt in /opt/homebrew/lib/python3.11/site-packages (from mangadex-downloader==2.8.2) (2.6.0)
Requirement already satisfied: requests-doh==0.3.0 in /opt/homebrew/lib/python3.11/site-packages (from mangadex-downloader==2.8.2) (0.3.0)
Requirement already satisfied: beautifulsoup4 in /opt/homebrew/lib/python3.11/site-packages (from mangadex-downloader==2.8.2) (4.11.2)
Requirement already satisfied: Pillow==9.3.0 in /opt/homebrew/lib/python3.11/site-packages (from mangadex-downloader==2.8.2) (9.3.0)
Requirement already satisfied: dnspython[doh]==2.3.0 in /opt/homebrew/lib/python3.11/site-packages (from requests-doh==0.3.0->mangadex-downloader==2.8.2) (2.3.0)
Requirement already satisfied: h2>=4.1.0 in /opt/homebrew/lib/python3.11/site-packages (from dnspython[doh]==2.3.0->requests-doh==0.3.0->mangadex-downloader==2.8.2) (4.1.0)
Requirement already satisfied: httpx>=0.21.1 in /opt/homebrew/lib/python3.11/site-packages (from dnspython[doh]==2.3.0->requests-doh==0.3.0->mangadex-downloader==2.8.2) (0.23.3)
Requirement already satisfied: requests-toolbelt<0.11.0,>=0.9.1 in /opt/homebrew/lib/python3.11/site-packages (from dnspython[doh]==2.3.0->requests-doh==0.3.0->mangadex-downloader==2.8.2) (0.10.1)
Requirement already satisfied: charset-normalizer<4,>=2 in /opt/homebrew/lib/python3.11/site-packages (from requests[socks]->mangadex-downloader==2.8.2) (3.1.0)
Requirement already satisfied: idna<4,>=2.5 in /opt/homebrew/lib/python3.11/site-packages (from requests[socks]->mangadex-downloader==2.8.2) (3.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /opt/homebrew/lib/python3.11/site-packages (from requests[socks]->mangadex-downloader==2.8.2) (1.26.14)
Requirement already satisfied: certifi>=2017.4.17 in /opt/homebrew/lib/python3.11/site-packages (from requests[socks]->mangadex-downloader==2.8.2) (2022.12.7)
Requirement already satisfied: soupsieve>1.2 in /opt/homebrew/lib/python3.11/site-packages (from beautifulsoup4->mangadex-downloader==2.8.2) (2.4)
Requirement already satisfied: PySocks!=1.5.7,>=1.5.6 in /opt/homebrew/lib/python3.11/site-packages (from requests[socks]->mangadex-downloader==2.8.2) (1.7.1)
Requirement already satisfied: hyperframe<7,>=6.0 in /opt/homebrew/lib/python3.11/site-packages (from h2>=4.1.0->dnspython[doh]==2.3.0->requests-doh==0.3.0->mangadex-downloader==2.8.2) (6.0.1)
Requirement already satisfied: hpack<5,>=4.0 in /opt/homebrew/lib/python3.11/site-packages (from h2>=4.1.0->dnspython[doh]==2.3.0->requests-doh==0.3.0->mangadex-downloader==2.8.2) (4.0.0)
Requirement already satisfied: httpcore<0.17.0,>=0.15.0 in /opt/homebrew/lib/python3.11/site-packages (from httpx>=0.21.1->dnspython[doh]==2.3.0->requests-doh==0.3.0->mangadex-downloader==2.8.2) (0.16.3)
Requirement already satisfied: rfc3986[idna2008]<2,>=1.3 in /opt/homebrew/lib/python3.11/site-packages (from httpx>=0.21.1->dnspython[doh]==2.3.0->requests-doh==0.3.0->mangadex-downloader==2.8.2) (1.5.0)
Requirement already satisfied: sniffio in /opt/homebrew/lib/python3.11/site-packages (from httpx>=0.21.1->dnspython[doh]==2.3.0->requests-doh==0.3.0->mangadex-downloader==2.8.2) (1.3.0)
Requirement already satisfied: h11<0.15,>=0.13 in /opt/homebrew/lib/python3.11/site-packages (from httpcore<0.17.0,>=0.15.0->httpx>=0.21.1->dnspython[doh]==2.3.0->requests-doh==0.3.0->mangadex-downloader==2.8.2) (0.14.0)
Requirement already satisfied: anyio<5.0,>=3.0 in /opt/homebrew/lib/python3.11/site-packages (from httpcore<0.17.0,>=0.15.0->httpx>=0.21.1->dnspython[doh]==2.3.0->requests-doh==0.3.0->mangadex-downloader==2.8.2) (3.6.2)

@mansuf
Copy link
Owner

mansuf commented Mar 11, 2023

Did you try to uninstall it first before install the patched version ? Try to uninstall the application first and then install it

pip uninstall mangadex-downloader
pip install --no-cache-dir --upgrade git+https://github.com/mansuf/mangadex-downloader.git@12c469642963de9e9ba7cebc7c0e1bae83b06aad

I apologies for giving unclear instructions, sorry about that.

@ScherisMarie
Copy link
Author

After following the above instructions, it works as intended again now on my end. :)

mansuf added a commit that referenced this issue Mar 12, 2023
Fix `AttributeError: 'NoneType' object has no attribute xx` for any raw formats
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
2 participants