python-sdk icon indicating copy to clipboard operation
python-sdk copied to clipboard

Error runing with websocket client

Open freefri opened this issue 3 years ago • 3 comments

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?

freefri avatar Aug 20 '21 18:08 freefri

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

thegoliathgeek avatar Aug 23 '21 08:08 thegoliathgeek

Hi, any updates here?

freefri avatar Dec 30 '21 15:12 freefri

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

from websockets import client as wsClient websockets.client=wsClient

desdal avatar Feb 08 '22 01:02 desdal