cyr-ius / cozytouchpy

Cozytouch python implementation
GNU General Public License v3.0
12 stars 7 forks source link

example.py script exits with error #18

Open bevaart opened 1 year ago

bevaart commented 1 year ago

Traceback (most recent call last): File "./example.py", line 98, in <module> loop.run_until_complete(async_demo()) File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete return future.result() File "./example.py", line 58, in async_demo await client.connect() File "/home/rutger/dev/cozytouchpy/cozytouchpy/client.py", line 79, in connect response = await self.__post("login", data=payload) File "/home/rutger/dev/cozytouchpy/cozytouchpy/client.py", line 58, in __post f"{self.server.endpoint}{path}", AttributeError: 'str' object has no attribute 'endpoint' 2023-05-20 16:36:38,085 - asyncio - ERROR - Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x761a6590> 2023-05-20 16:36:38,086 - asyncio - ERROR - Unclosed connector connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x75c35d88>, 2662954.852166356)]'] connector: <aiohttp.connector.TCPConnector object at 0x75d0f970>

I included the proposed fixes for API and auth.