Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Type error when getting a dashboard

Open
#920 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
api

Research direction

Start by reproducing dashboards_api.get_dashboard(dashboard.get("id")) with a dashboard whose widget layout x is a float. Trace the v1 dashboard response validation for received_data.widgets[15].layout.x and verify that retrieval succeeds while preserving the float value.

Written by the indexing model from the issue text.

Description

kind/bug stale

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:

  1. Have a dashboard that has and X value that is a float and not an int
  2. Call get_dashboard for said dashboard
  3. See error

Expected behavior
The dashboard is returned with the float value for X

Environment and Versions (please complete the following information):

  • Windows 10
  • Python 3.10
  • api client v1
Dominant language
Python
Stars
166
Forks
55
Avg merge
2d 17h
Merged PRs (30d)
73

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DataDog/datadog-api-client-python

All issues in DataDog/datadog-api-client-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.