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 - 'NoneType' object has no attribute 'startswith'. #165

Closed
CaptainJawZ opened this issue Feb 18, 2019 · 3 comments
Closed

Comments

@CaptainJawZ
Copy link

I've got this error on Gallery-DL

[tumblr][error] An unexpected error occurred: AttributeError - 'NoneType' object has no attribute 'startswith'. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[tumblr][debug]
Traceback (most recent call last):
  File "c:\python36\lib\site-packages\gallery_dl\job.py", line 56, in run
    self.dispatch(msg)
  File "c:\python36\lib\site-packages\gallery_dl\job.py", line 98, in dispatch
    if self.pred_url(url, kwds):
  File "c:\python36\lib\site-packages\gallery_dl\util.py", line 253, in __call__
    if url.startswith("text:"):
AttributeError: 'NoneType' object has no attribute 'startswith'
@mikf
Copy link
Owner

mikf commented Feb 18, 2019

Can you provide the specific blog or post where this happens?

The error occurred because the download URL returned by the Tumblr extractor was None instead of a valid URL. Fixing it by ignoring such "URLs" is no big deal, but I would like to see what exactly went wrong here.

@CaptainJawZ
Copy link
Author

Oh sorry for the late reply, here is the post where this happens, I use Gallery-DL for dozens of blogs this is the first one I encounter an issue with
pinetre-3.tumblr.com/
It also happens very early when the scrip runs like after 30 images or so

how cna I configure the json file to ignore such urls?

@mikf mikf closed this as completed in d0059ca Feb 19, 2019
@mikf
Copy link
Owner

mikf commented Feb 19, 2019

The offending post was http://pinetre-3.tumblr.com/post/181904381470/via - an audio post with null/None as URL.

how can I configure the json file to ignore such urls?

No such option exists at the moment. I might add something like that in the future, but it is usually better to fix the extractor in question instead of ignoring a problem that should be fixed.

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

No branches or pull requests

2 participants