Code worked until yesterday giving error today

jatinkanand
The login was done successfully and when calling file to perform trade related stuff, code started giving error. I"ve made literally no change, just changed the request and access token, that's it. Sometimes error is as silly as "ModuleNotFoundError: No module named 'kiteconnect'" but that's temporary.

Can someone pls guide me what's wrong I'm doing, coz my login flow is using exact same import and it's working, it throws kiteconnect module error when I'm trying to run subprocess to call my main file to trade:

import subprocess
subprocess.Popen(["python", "Trader.py"])

If I run only Trader.py file instead of using subprocess, it works but start giving below error. Is it because I'm trying to run it before market is open?

Connection error: 1006 - connection was closed uncleanly (WebSocket connection upgrade failed (403 - Forbidden))
Connection closed: 1006 - connection was closed uncleanly (WebSocket connection upgrade failed (403 - Forbidden))
ERROR:kiteconnect.ticker:Connection error: 1006 - connection was closed uncleanly (WebSocket connection upgrade failed (403 - Forbidden))
ERROR:kiteconnect.ticker:Connection closed: 1006 - connection was closed uncleanly (WebSocket connection upgrade failed (403 - Forbidden))

Looking forward to hear from zerodha tech team or anyone willing to help.

Thanks.
  • sujith
    A 403 http status code means your session is expired and you may have to login and create a new access token.
Sign In or Register to comment.