Skip to content

Bad request from api #12

Description

@karl500

Hi,

When i run the example that is provided in the readme file i get a error with KeyError: 'data'.

When i dug a little deeper i found that the response from the api is 400 Bad Request.

What could cause this?

Adding the traceback:
Traceback (most recent call last):
File "test.py", line 30, in
loop.run_until_complete(test())
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "test.py", line 24, in test
devices = await sc.get_devices()
File "/home/karl/.local/lib/python3.8/site-packages/systemair/saveconnect/systemair.py", line 289, in get_devices
devices = await self.graphql.queryGetAccount()
File "/home/karl/.local/lib/python3.8/site-packages/systemair/saveconnect/graphql.py", line 156, in queryGetAccount
response_data = await self.post_request(
File "/home/karl/.local/lib/python3.8/site-packages/systemair/saveconnect/graphql.py", line 210, in post_request
response_data = response.json()["data"]
KeyError: 'data'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions