Skip to content

refresh_data API reference stopped working #418

@pacmanster1

Description

@pacmanster1

Ran a monthly Colab script this morning and it generated an error when running

dw.refresh_data(chart_id_datawrapper)

output with the following error

AssertionError Traceback (most recent call last)
in <cell line: 361>()
361 if cntLists == cntLatest:
362 dw.add_data(chart_id_datawrapper,dfLatestChanges)
--> 363 dw.refresh_data(chart_id_datawrapper)
364 dw.update_description(
365 chart_id=chart_id_datawrapper,

/usr/local/lib/python3.10/dist-packages/datawrapper/main.py in refresh_data(self, chart_id)
1242 """
1243 response = self.post(f"{self._CHARTS_URL}/{chart_id}/data/refresh")
-> 1244 assert isinstance(response, dict)
1245 return response
1246

AssertionError:

Environment

Running this in Colab

📎 Additional context

https://datawrapper.readthedocs.io/en/latest/user-guide/api.html#datawrapper.Datawrapper.refresh_data

refresh_data(chart_id: str) → Response
Fetch configured external data and add it to the chart.

Parameters:
chart_id (str) – ID of chart, table or map to add data to.

Returns:
A requests.Response

Return type:
requests.Response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions