It looks like you're new here. If you want to get involved, click one of these buttons!
ws.connect()
has been failing. I found the error to be:
failing WebSocket connection (code=1000): "module 'log' has no attribute 'connect'"
I found ws.socket_url
(below) value to be correct. Here is the log. Max retries are tried out, and every retry fails with above error.I am using Kiteconnect version 4.2.0. What could be the issue?2023-02-22 16:26:15.257588: socket_url: wss://ws.kite.trade?api_key=6063OVERWRITTENa1xp9&access_token=PArKJVdWcSOVERWRITTENXOpDZ8CI
2023-02-22 16:26:15+0530 [-] Log opened.
2023-02-22 16:26:15+0530 [-] failing WebSocket connection (code=1000): "module 'log' has no attribute 'connect'"
2023-02-22 16:26:15+0530 [-] dropping connection to peer tcp4:3.6.127.72:443 with abort=True: I dropped the WebSocket TCP connection: module 'log' has no attribute 'connect'
2023-02-22 16:26:15+0530 [-] <twisted.internet.tcp.Connector instance at 0x2821114df30 disconnected IPv4Address(type='TCP', host='ws.kite.trade', port=443)> will retry in 2 seconds
2023-02-22 16:26:15+0530 [-] Stopping factory <kiteconnect.ticker.KiteTickerClientFactory object at 0x000002821114E6B0>
2023-02-22 16:26:18+0530 [-] Starting factory <kiteconnect.ticker.KiteTickerClientFactory object at 0x000002821114E6B0>
2023-02-22 16:26:18+0530 [-] failing WebSocket connection (code=1000): "module 'log' has no attribute 'connect'"
2023-02-22 16:26:18+0530 [-] dropping connection to peer tcp4:3.6.127.72:443 with abort=True: I dropped the WebSocket TCP connection: module 'log' has no attribute 'connect'
2023-02-22 16:26:18+0530 [-] <twisted.internet.tcp.Connector instance at 0x2821114df30 disconnected IPv4Address(type='TCP', host='ws.kite.trade', port=443)> will retry in 5 seconds
2023-02-22 16:26:18+0530 [-] Stopping factory <kiteconnect.ticker.KiteTickerClientFactory object at 0x000002821114E6B0>
Can you add below logging level and paste the response from same here:
on_connect()
was causing connection failure. Since I didn't catch exception inon_connect()
, I spent lot of time debugging.