DataDog / datadog-api-client-python

Python client for the Datadog API

Home Page:https://datadoghq.dev/datadog-api-client-python/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

get_dashboard: Invalid value for `x`, must be a value greater than or equal to `0`

svenXY opened this issue · comments

Describe the bug
When trying to retrieve some dashboards with the get_dashboard() method, I get Invalid value for x, must be a value greater than or equal to 0 for some dashboards. Most dashboards work ok though.

Downloading the JSON from the dashboard Webpage does not show any x that are not 0 or greater and all of them are int. The dashboard has been created with the GUI, not via API, so I'd expect it to be fitting with the model.

Seems to be similar to #920, but here it is not the type that is wrong, but the value

To Reproduce
Steps to reproduce the behavior:

Since this is not a public datadog, I do not know how to give advice on how to reproduce, but for me it is:

  1. dashboard_data = self.api_instance.get_dashboard( dashboard_id=id, )
  2. Find the exception
  3. Download the named dashboard from GUI
  4. Check all 'x' values
  5. All of them set, int and >= 0

Expected behavior
Being able to properly download the dashboard

Environment and Versions (please complete the following information):

Python 3.10.x
datadog-api-client==2.3.0
Using the EU instance of Datadog

FWIW - I went into the Dashboards, started edit mode, added a widget, saved, then removed it again and now it works.
The dashboards mentioned were a bit older and maybe were autofixed (i.e. migrated) to the latest model upon editing.