sinricpro / python-sdk

python3 sdk for sinric pro.
https://sinric.pro
23 stars 9 forks source link

Error runing with websocket client #29

Open freefri opened 3 years ago

freefri commented 3 years ago

I am getting the error AttributeError: module 'websocket' has no attribute 'client'

I am getting this error after running pip install websocket-client with Python 3.9 on Windows 10. I have got websocket-client 1.2.1 which contain this line:

self.connection = await websockets.client.connect('ws://ws.sinric.pro',

Checking the code in the repository I see that this line was changed here https://github.com/sinricpro/python-sdk/blob/8fe65465c575e604ee54ea90eb612ecda17a7b06/sinric/_sinricprosocket.py#L35

Maybe I am doing something wrong? or the last changes were not yet released in pip?

thegoliathgeek commented 3 years ago

@freefri it's pip install websockets. Am still working on new updates with event_loops. Will publish it soon.

freefri commented 2 years ago

Hi, any updates here?

desdal commented 2 years ago

Edit the file sinric/_sinricprosocket.py add this line next to "import websockets" line:

from websockets import client as wsClient websockets.client=wsClient