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

refresh_data API reference stopped working #418

Open
pacmanster1 opened this issue Mar 14, 2024 · 0 comments
Open

refresh_data API reference stopped working #418

pacmanster1 opened this issue Mar 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@pacmanster1
Copy link

pacmanster1 commented Mar 14, 2024

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

@pacmanster1 pacmanster1 added the bug Something isn't working label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant