Solved the problem. Made 3 changes, not sure what exactly worked:
- uninstalled and re-installed websocket library
- Added this to the code: logging.basicConfig(level=logging.DEBUG)
- Added this also to the code: kite.set_access_token…
Thanks for your response, @rakeshr. My code is as below
from kiteconnect import KiteConnect
from kiteconnect import KiteTicker
api_key = ''
api_secret = ''
kite = KiteConnect(api_key)
request_token = ''