You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When trying to retrieve a dashboard by using the call dashboards_api.get_dashboard(dashboard.get("id")), I get an error saying datadog_api_client.v1.exceptions.ApiTypeError: Invalid type for variable 'x'. Required value type is int and passed type was float at ['received_data']['widgets'][15]['layout']['x']
To Reproduce
Steps to reproduce the behavior:
Have a dashboard that has and X value that is a float and not an int
Call get_dashboard for said dashboard
See error
Expected behavior
The dashboard is returned with the float value for X
Environment and Versions (please complete the following information):
Regarding the dashboard bug, it's a difference between the OpenAPI spec and old backend behavior. Obviously float X doesn't make sense, but it was still stored this way.
The monitor issue is completely different. It might be because of additional validation introduced in 1.10. Can you open a different issue? Thanks.
@therve thanks for the quick answer. do you have any hint on when that bug could be fixed or if there is a way we could mitigate on our side? I see the implementation isn't done in the v2 of the API yet.
I worked around the issue by using the http REST endpoint, but I would rather use the client so that I have the Model type of the dashboard returned to me.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community.
If you would like this issue to remain open:
Verify that you can still reproduce the issue in the latest version of this project.
Comment that the issue is still reproducible and include updated details requested in the issue template.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community.
If you would like this issue to remain open:
Verify that you can still reproduce the issue in the latest version of this project.
Comment that the issue is still reproducible and include updated details requested in the issue template.
Is it happening on a recent dashboard? Otherwise just editing the dashboard and saving it should fix it. Please contact support so that we can see the problematic dashboard. Thanks.
Is it happening on a recent dashboard? Otherwise just editing the dashboard and saving it should fix it. Please contact support so that we can see the problematic dashboard. Thanks.
@therve Thanks for the reply! It was probably old dashboards, the problem was some of the widgets have x or y coordinate as floats, I managed to fix it by manually editing those dashboards resizing those individual widgets which the new coordinates are integers, not the most efficient solution but it got the work done.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community.
If you would like this issue to remain open:
Verify that you can still reproduce the issue in the latest version of this project.
Comment that the issue is still reproducible and include updated details requested in the issue template.
We see this when using dashboards where we've edited the location of the widgets. It's possible that I could resolve it by editing every widget, but simply editing the console and saving it doesn't cause the widgets to snap to integer locations.
Would you consider a PR to accept floats like this?
This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community.
If you would like this issue to remain open:
Verify that you can still reproduce the issue in the latest version of this project.
Comment that the issue is still reproducible and include updated details requested in the issue template.
Activity
anapernalete commentedon Mar 30, 2022
Hey there, reporting on the same issue, I am receiving a similar error with the monitor API. This seems to be specific to version 1.10.0.
A few observations:
list_monitorsget_monitorrandom ID's would not work, but some would. Seemed to be no specific patternid_offsettolist_monitorsAPI call, it would also randomly error on specific ID's with a similar error aboveIf I roll back to 1.9:
pip install datadog-api-client==1.9.0, this seems to fix the problem, so seems like a bug in the version 1.10 release.Environment and Versions (please complete the following information):
Mac OS Monterey
Python 3.9
api client v1, v1.10
therve commentedon Mar 30, 2022
Hi,
Regarding the dashboard bug, it's a difference between the OpenAPI spec and old backend behavior. Obviously float X doesn't make sense, but it was still stored this way.
The monitor issue is completely different. It might be because of additional validation introduced in 1.10. Can you open a different issue? Thanks.
larryenvacances commentedon Mar 30, 2022
@therve thanks for the quick answer. do you have any hint on when that bug could be fixed or if there is a way we could mitigate on our side? I see the implementation isn't done in the v2 of the API yet.
I worked around the issue by using the http REST endpoint, but I would rather use the client so that I have the Model type of the dashboard returned to me.
therve commentedon Mar 31, 2022
A quick workaround would be to update the dashboard to only have have integers for x and y attributes.
github-actions commentedon May 1, 2022
Thanks for your contribution!
This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community.
If you would like this issue to remain open:
Verify that you can still reproduce the issue in the latest version of this project.
Comment that the issue is still reproducible and include updated details requested in the issue template.
valfa14 commentedon May 31, 2022
Hey, Any plans to fix it? We hot-fixed it with local retyping float to int here https://github.com/DataDog/datadog-api-client-python/blob/master/src/datadog_api_client/v1/model/widget_layout.py#L85-L86
We want to fix corrupted (by manual interaction) dashboards automatically, but it is not doable as those manual changes break the loading via your module.
github-actions commentedon Jul 1, 2022
Thanks for your contribution!
This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community.
If you would like this issue to remain open:
Verify that you can still reproduce the issue in the latest version of this project.
Comment that the issue is still reproducible and include updated details requested in the issue template.
zepeng811 commentedon Oct 26, 2022
This is still an issue with the latest version
2.5.0, any plan on fixing this issue soon?therve commentedon Oct 26, 2022
Is it happening on a recent dashboard? Otherwise just editing the dashboard and saving it should fix it. Please contact support so that we can see the problematic dashboard. Thanks.
zepeng811 commentedon Oct 26, 2022
@therve Thanks for the reply! It was probably old dashboards, the problem was some of the widgets have x or y coordinate as floats, I managed to fix it by manually editing those dashboards resizing those individual widgets which the new coordinates are integers, not the most efficient solution but it got the work done.
github-actions commentedon Nov 27, 2022
Thanks for your contribution!
This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community.
If you would like this issue to remain open:
Verify that you can still reproduce the issue in the latest version of this project.
Comment that the issue is still reproducible and include updated details requested in the issue template.
edkorthof commentedon May 8, 2024
We see this when using dashboards where we've edited the location of the widgets. It's possible that I could resolve it by editing every widget, but simply editing the console and saving it doesn't cause the widgets to snap to integer locations.
Would you consider a PR to accept floats like this?
github-actions commentedon Sep 21, 2024
Thanks for your contribution!
This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community.
If you would like this issue to remain open:
Verify that you can still reproduce the issue in the latest version of this project.
Comment that the issue is still reproducible and include updated details requested in the issue template.