kiteconnect.ticker:Connection error: 1006

prajwal
Hi,

on Python client, when I try kws.connet(threaded='True'), I'm encountering error:

ERROR:kiteconnect.ticker:Connection error: 1006 - connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake)
INFO:root:Connection error: 1006 - connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake)
ERROR:kiteconnect.ticker:Connection closed: 1006 - connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake)

kiteconnect version is 3.7.4
  • rakeshr
    @prajwal
    If you are not using external thread, you can remove threaded='True', from kws.connect().
  • prajwal
    I tried removing threaded='True'.
    I still get the same error
  • rakeshr
    @prajwal
    Any unhandled exception in your code will result in on_error call which in turn calls on_close.on_close will have ws.stop() , which will stop the thread.So, If you need the reconnection logic to kick in, dont use ws.stop() inside on_close.
    Also, make sure, you don't have any variable related error on on_ticks method.
This discussion has been closed.