Skip to content

Zenodo call throws error due to request rate limit #117

@pabloitu

Description

@pabloitu

Zenodo requests causes error in request json parsing

r = requests.get(f"https://zenodo.org/api/records/{record_id}", timeout=30)

download_urls = [f["links"]["self"] for f in r.json()["files"]]
                                                 ^^^^^^^^

    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 2 column 11 (char 11)

This is caused by a HTML reply rather than a JSON, due to Zenodo limiting
rate requests (https://blog.zenodo.org/2025/11/25/2025-11-14-search-api-updates/). This causes tests and tutorials to usually fail. This might be due to multiple model flavours calls in the same zenodo repository in quick succession, which label the IP to be causing suspicious traffic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions