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

[BUG] Unable to parse cell data #282

Closed
abhi1693 opened this issue Jul 4, 2021 · 3 comments · Fixed by #290
Closed

[BUG] Unable to parse cell data #282

abhi1693 opened this issue Jul 4, 2021 · 3 comments · Fixed by #290
Labels
bug Something isn't working
Milestone

Comments

@abhi1693
Copy link
Contributor

abhi1693 commented Jul 4, 2021

Steps to reproduce:
List the minimal actions needed to reproduce the behavior.

from influxdb_client import CellsService
from influxdb_client.domain.create_cell import CreateCell

create_cell_request = CreateCell(name="test", h=3, w=12)
cell = CellsService().post_dashboards_id_cells(dashboard_id=dashboard_id, create_cell=create_cell_request)
print(cell.get('id'))

The issue is at

response_type='Cell', # noqa: E501

The response_type should have been object.

PS: This issue is also in various other places of the code as well. The services should return object but they dont.

Expected behavior:
This should have returned a dict on which the get method can be used.

Actual behavior:
AttributeError: 'Cell' object has no attribute 'get'

Specifications:

  • Client Version: 1.18.0
  • InfluxDB Version: 2.0.5
  • Platform: Linux
@abhi1693
Copy link
Contributor Author

abhi1693 commented Jul 4, 2021

@bednar Another issue with OpenAPI specification. Can you please take a look?

@abhi1693
Copy link
Contributor Author

Ok, so my issue is reversed. Cell object being returned is fine. But the Dashboard returns a dict instead of an object. That seems inconsistent.

@bednar
Copy link
Contributor

bednar commented Jul 12, 2021

@abhi1693 thanks for using our client, we will take a look

@bednar bednar added the bug Something isn't working label Jul 21, 2021
@bednar bednar added this to the 1.20.0 milestone Jul 26, 2021
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
2 participants