Skip to content

tumblr, KeyError: 'offset', "pagination": "offset" not progressing to page 2; debug attached #8720

@minienglish1

Description

@minienglish1

tumblr; KeyError: 'offset;, "pagination": "offset" not progressing to page 2

I use config file with my api key, but also received the same error when not using my config.

Error:
[gallery-dl][debug] Version 1.31.0-dev:2025.12.02 - Executable (dev/windows)
[gallery-dl][debug] Python 3.13.9 - Windows-10-10.0.19045-SP0
[gallery-dl][debug] requests 2.32.5 - urllib3 2.5.0
[gallery-dl][debug] Configuration Files ['H:\tumblr_semantic\gallery-dl.conf', 'gallery-dl_2.conf']
[gallery-dl][debug] Starting DownloadJob for 'https://www.tumblr.com/search/coca-cola can'
[tumblr][debug] Using TumblrSearchExtractor for 'https://www.tumblr.com/search/coca-cola can'
[tumblr][debug] Using custom api_key authentication
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): api.tumblr.com:443
[urllib3.connectionpool][debug] https://api.tumblr.com:443 "GET /v2/timeline/search?limit=50&query=coca-cola+can&reblog_info=true&api_key=yLUDBZaGHJHjlkfvwmCtEKf9dmzr4nqwWthlsQ9v74sCTcSPvs HTTP/1.1" 200 None
. . .
[urllib3.connectionpool][debug] https://64.media.tumblr.com:443 "GET /2ffa2486a080221f14aaefcb3d7633fa/f498eb9ccc7ac01f-3e/s99999x99999/4f9909b739693a3d5075d566cabce92cc89a976e.jpg HTTP/1.1" 200 None
gallery-dl\tumblr\coca-cola can\tumblr_christinered_783030190836187136_01.jpg
[tumblr][error] An unexpected error occurred: KeyError - 'offset'. 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 "gallery_dl\job.py", line 159, in run
File "gallery_dl\extractor\tumblr.py", line 74, in items
File "gallery_dl\extractor\tumblr.py", line 576, in _pagination
KeyError: 'offset'

I tried to hack it to get a short-term solution:

Besides params["offset"] -> KeyError: 'offset',
then params["limit"] a str, wouldn't add to params["offset"
then data["total_posts"] -> KeyError: "total_posts"

So:
else: # offset
params["offset"] =
text.parse_int(params.get("offset", 0)) + text.parse_int(params.get("limit", 0))
#text.parse_int(params["offset"]) + params["limit"]
params["before"] = None
if params["offset"] >= 200:
#if params["offset"] >= data["total_posts"]:
return

It seems to be working, or at least going to the next page. So, no rush.

Also, thanks for this awesome software!!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions