CJNE / pyporscheconnectapi

Python client library for Porsche Connect API
MIT License
44 stars 9 forks source link

API broken again? #36

Closed augmentedtraffic closed 8 months ago

augmentedtraffic commented 8 months ago

It did work after the latest fix, but this morning there appears to be some issues again:

I wasn't able to run this the past couple of days since I confirmed it was working., but today it seems like it is not working (at least for me) - anyone else?

loop.run_until_complete(vehicles()) File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete return future.result() File "./porsche1.py", line 67, in vehicles vehicles = await client.getVehicles() File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/client.py", line 449, in getVehicles f"https://api.porsche.com/core/api/v3/{self.locale_str}/vehicles" File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/connection.py", line 237, in get headers = await self._createhead(application) File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/connection.py", line 292, in _createhead application, wasExpired=(token is not None) File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/connection.py", line 206, in _requestToken await self._login() File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/connection.py", line 183, in _login self.auth_state["code"] = params["code"][0] KeyError: 'code' Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x732e69b0> Unclosed connector connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x732e2ab0>, 76.183382306)]'] connector: <aiohttp.connector.TCPConnector object at 0x732e69d0>

mikeljo commented 8 months ago

for me it works. Refresh Time is actual and the data ist right. But i have no Battery History. Only actual SoC

Am 30.10.2023 um 12:24 schrieb Adrian @.***>:

It did work after the latest fix, but this morning there appears to be some issues again:

I wasn't able to run this the past couple of days since I confirmed it was working., but today it seems like it is not working (at least for me) - anyone else?

loop.run_until_complete(vehicles()) File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete return future.result() File "./porsche1.py", line 67, in vehicles vehicles = await client.getVehicles() File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/client.py", line 449, in getVehicles f"https://api.porsche.com/core/api/v3/{self.locale_str}/vehicles https://api.porsche.com/core/api/v3/%7Bself.locale_str%7D/vehicles" File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/connection.py", line 237, in get headers = await self._createhead(application) File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/connection.py", line 292, in _createhead application, wasExpired=(token is not None) File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/connection.py", line 206, in _requestToken await self._login() File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/connection.py", line 183, in _login self.auth_state["code"] = params["code"][0] KeyError: 'code' Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x732e69b0> Unclosed connector connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x732e2ab0>, 76.183382306)]'] connector: <aiohttp.connector.TCPConnector object at 0x732e69d0>

— Reply to this email directly, view it on GitHub https://github.com/CJNE/pyporscheconnectapi/issues/36, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMR2HD2FMQ7WO57L3ASSILYB6E7XAVCNFSM6AAAAAA6V3DET6VHI2DSMVQWIX3LMV43ASLTON2WKOZRHE3DQMJRGI4TMMI. You are receiving this because you are subscribed to this thread.

augmentedtraffic commented 8 months ago

for me it works. Refresh Time is actual and the data ist right. But i have no Battery History. Only actual SoC Am 30.10.2023 um 12:24 schrieb Adrian @.***>: It did work after the latest fix, but this morning there appears to be some issues again: I wasn't able to run this the past couple of days since I confirmed it was working., but today it seems like it is not working (at least for me) - anyone else? loop.run_until_complete(vehicles()) File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete return future.result() File "./porsche1.py", line 67, in vehicles vehicles = await client.getVehicles() File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/client.py", line 449, in getVehicles f"https://api.porsche.com/core/api/v3/{self.locale_str}/vehicles https://api.porsche.com/core/api/v3/%7Bself.locale_str%7D/vehicles" File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/connection.py", line 237, in get headers = await self._createhead(application) File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/connection.py", line 292, in _createhead application, wasExpired=(token is not None) File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/connection.py", line 206, in _requestToken await self._login() File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/connection.py", line 183, in _login self.auth_state["code"] = params["code"][0] KeyError: 'code' Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x732e69b0> Unclosed connector connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x732e2ab0>, 76.183382306)]'] connector: <aiohttp.connector.TCPConnector object at 0x732e69d0> — Reply to this email directly, view it on GitHub <#36>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMR2HD2FMQ7WO57L3ASSILYB6E7XAVCNFSM6AAAAAA6V3DET6VHI2DSMVQWIX3LMV43ASLTON2WKOZRHE3DQMJRGI4TMMI. You are receiving this because you are subscribed to this thread.

thanks I switched networks and got it working - it may be whitelist issue thanks

augmentedtraffic commented 8 months ago

closing