coinbasepro-python
coinbasepro-python copied to clipboard
'NoneType' object has no attribute 'join'
on example: import cbpro
Parameters are optional
wsClient = cbpro.WebsocketClient(url="wss://ws-feed.pro.coinbase.com", products="BTC-USD", channels=["ticker"])
Do other stuff...
wsClient.close()
i get this error:
File "C:\Python3\lib\site-packages\cbpro\websocket_client.py", line 104, in close self.thread.join() AttributeError: 'NoneType' object has no attribute 'join'
Please advise
I am also having this issue. Have you found a fix yet or are we waiting for someone to help still? Thanks!
This is occurring as you have not yet started listening. You must first call .start() before calling .close()
Example Usage:
import cbpro
wsClient = cbpro.WebsocketClient(url="wss://ws-feed.pro.coinbase.com",
products=["BTC-USD"],
channels=["ticker"])
wsClient.start()
# Do stuff here, sleeping for example
time.sleep(10)
wsClient.close()