I'm trying to connect to the stream on ubuntu 20.04 and python3.8
Traceback (most recent call last):
...
File "services/TDAmery/AccountActivityStreamListener.py", line 18, in read_stream
await stream_client.build_pipeline()
File "/home/ubuntu/news-miner/venv/lib/python3.8/site-packages/td/stream.py", line 500, in build_pipeline
await self._connect()
File "/home/ubuntu/news-miner/venv/lib/python3.8/site-packages/td/stream.py", line 631, in _connect
self.connection = await websockets.client.connect(self.websocket_url)
File "/home/ubuntu/news-miner/venv/lib/python3.8/site-packages/websockets/imports.py", line 92, in getattr
raise AttributeError(f"module {package!r} has no attribute {name!r}")
AttributeError: module 'websockets' has no attribute 'client'
I fixed this issue by adding this line to td/stream.py line 14:
If it's ok, I'll create a pull request.