perara / python-systemair-saveconnect

API bindings for the systemair-savecair web interface
MIT License
14 stars 4 forks source link

Bad request from api #12

Open karl500 opened 6 months ago

karl500 commented 6 months ago

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'