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

Erome broken for posts with no tags #7114

Open
timcharlamagne opened this issue Mar 4, 2025 · 1 comment
Open

Erome broken for posts with no tags #7114

timcharlamagne opened this issue Mar 4, 2025 · 1 comment

Comments

@timcharlamagne
Copy link

Bug induced by #7076. For example, a post currently (2025-03-04, 00:53 am EST) on the front page:

gallery-dl https://www.erome.com/a/tvY5OqtG --verbose

returns

[gallery-dl][debug] Version 1.29.0 - Git HEAD: 64efed206d
[gallery-dl][debug] Python 3.13.2 - macOS-15.3.1-arm64-arm-64bit-Mach-O
[gallery-dl][debug] requests 2.32.3 - urllib3 2.3.0
[gallery-dl][debug] Configuration Files []
[gallery-dl][debug] Starting DownloadJob for 'https://www.erome.com/a/tvY5OqtG'
[erome][debug] Using EromeAlbumExtractor for 'https://www.erome.com/a/tvY5OqtG'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.erome.com:443
[urllib3.connectionpool][debug] https://www.erome.com:443 "GET /a/tvY5OqtG HTTP/1.1" 200 None
[erome][error] An unexpected error occurred: AttributeError - 'NoneType' object has no attribute 'index'. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[erome][debug] 
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/gallery-dl/1.29.0/libexec/lib/python3.13/site-packages/gallery_dl/job.py", line 152, in run
    for msg in extractor:
               ^^^^^^^^^
  File "/opt/homebrew/Cellar/gallery-dl/1.29.0/libexec/lib/python3.13/site-packages/gallery_dl/extractor/erome.py", line 70, in items
    for t in text.extract_iter(tags, "?q=", '"')],
             ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/gallery-dl/1.29.0/libexec/lib/python3.13/site-packages/gallery_dl/text.py", line 163, in extract_iter
    index = txt.index
            ^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'index'

I'm not familiar with this codebase at all but it seems the try block in extract_iter needs a bit more logic to handle the None case?

@mikf
Copy link
Owner

mikf commented Mar 4, 2025

This has already been fixed by commits 472ea73 and db19990

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants