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

[tumblr][error] An unexpected error occurred: JSONDecodeError #297

Closed
ghost opened this issue Jun 4, 2019 · 3 comments
Closed

[tumblr][error] An unexpected error occurred: JSONDecodeError #297

ghost opened this issue Jun 4, 2019 · 3 comments

Comments

@ghost
Copy link

ghost commented Jun 4, 2019

warning: NSFW link

C:\Users\ucok66>gallery-dl http://ziemniax.tumblr.com/post/109697912859/black-spear-presenting-herself-in-full-glory
[tumblr][error] An unexpected error occurred: JSONDecodeError - Expecting value: line 1 column 1 (char 0). Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .

C:\Users\ucok66>gallery-dl --verbose flag http://ziemniax.tumblr.com/post/109697912859/black-spear-presenting-herself-in-full-glory
[gallery-dl][debug] Version 1.8.5
[gallery-dl][debug] Python 3.7.3 - Windows-10-10.0.17763-SP0
[gallery-dl][debug] requests 2.21.0 - urllib3 1.24
[1/2] flag
[gallery-dl][debug] Starting DownloadJob for 'flag'
[gallery-dl][debug] updating default urllib3 ciphers
[gallery-dl][error] No suitable extractor found for 'flag'
[2/2] http://ziemniax.tumblr.com/post/109697912859/black-spear-presenting-herself-in-full-glory
[gallery-dl][debug] Starting DownloadJob for 'http://ziemniax.tumblr.com/post/109697912859/black-spear-presenting-herself-in-full-glory'
[tumblr][debug] Using api_key authentication
[tumblr][debug] Using TumblrPostExtractor for 'http://ziemniax.tumblr.com/post/109697912859/black-spear-presenting-herself-in-full-glory'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): api.tumblr.com:443
[urllib3.connectionpool][debug] https://api.tumblr.com:443 "GET /v2/blog/ziemniax.tumblr.com/posts?id=109697912859&offset=0&limit=50&reblog_info=true&api_key=O3hU2tMi5e4Qs5t3vezEi6L0qRORJ5y9oUpSGsrWu8iA3UCc3B HTTP/1.1" 404 1278
[tumblr][error] An unexpected error occurred: JSONDecodeError - Expecting value: line 1 column 1 (char 0). 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:\users\ucok66\appdata\local\programs\python\python37\lib\site-packages\gallery_dl\job.py", line 53, in run
    for msg in self.extractor:
  File "c:\users\ucok66\appdata\local\programs\python\python37\lib\site-packages\gallery_dl\extractor\tumblr.py", line 72, in items
    for post in self.posts():
  File "c:\users\ucok66\appdata\local\programs\python\python37\lib\site-packages\gallery_dl\extractor\tumblr.py", line 351, in posts
    data = self._call(blog, "posts", params)
  File "c:\users\ucok66\appdata\local\programs\python\python37\lib\site-packages\gallery_dl\extractor\tumblr.py", line 375, in _call
    data = response.json()
  File "c:\users\ucok66\appdata\local\programs\python\python37\lib\site-packages\requests\models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "c:\users\ucok66\appdata\local\programs\python\python37\lib\json\__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "c:\users\ucok66\appdata\local\programs\python\python37\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "c:\users\ucok66\appdata\local\programs\python\python37\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
@ghost ghost closed this as completed Jun 4, 2019
@ghost ghost reopened this Jun 4, 2019
mikf added a commit that referenced this issue Jun 5, 2019
In some cases Tumblr's API responds with an HTML document.
Trying to decode it as JSON would raise an uncaught exception.
@mikf
Copy link
Owner

mikf commented Jun 5, 2019

Tumblr's API returns a There's nothing here. HTML page for this particular post, instead of the expected JSON response. Should be fixed with 208202b.

Can you actually view this post in your browser? Because I can't (with my account) and it is also not listed under http://ziemniax.tumblr.com.

Another thing I found while looking into this: You get to download quite a few more files for http://ziemniax.tumblr.com when using OAuth instead of the default API key authentication.

@mikf mikf closed this as completed Jun 5, 2019
@ghost
Copy link
Author

ghost commented Jun 5, 2019

Can you actually view this post in your browser?

No, I can't.

it is also not listed under http://ziemniax.tumblr.com.

It should be, but I think it's been censored

Sigh, In the past, this downloader was able to download this post, but now it can't. Tumblr becomes worse

@Hrxn
Copy link
Contributor

Hrxn commented Jun 5, 2019

Yeah, Tumblr is a broken mess after the "purge".

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