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

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

Closed
svenXY opened this issue Sep 30, 2022 · 2 comments
Closed
Labels

Comments

@svenXY
Copy link

svenXY commented Sep 30, 2022

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

@svenXY
Copy link
Author

svenXY commented Sep 30, 2022

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.

@svenXY svenXY closed this as completed Sep 30, 2022
@dlecocq
Copy link

dlecocq commented Nov 11, 2024

I also just encountered this issue. It seems like the client should be able to interpret any dashboard that was curated on Datadog, even through migrations of the internal or JSON representations of things (like the previous comment suspected with the case). The answer shouldn't be to go and re-save hundreds of dashboards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants