from Zerodha_Tradehull import Tradehull
from rich import print
import talib
api_key = " "
api_secret = " "
tsl = Tradehull(api_key, api_secret, "yes")
kite = tsl.kite
watchlist = ["BANKBARODA", "BANKINDIA", "TORNTPOWER", "UJJIVAN", "UNIONBANK", "VIPIND", "VEDL" ]
for name in watchlist:
data = tsl.get_short_length_hist_data(name=name, exchange="NSE", interval="5minute", oi=True)
data['rsi'] = talib.RSI(data['close'],timeperiod = 14)
print()
Exception has occurred: TypeError
'NoneType' object is not subscriptable
File "C:\Tradehull_mentorship\Session 2-20250818T064722Z-1-001\Session 2\practise02\practise02.py", line 15, in <module>
data['rsi'] = talib.RSI(data['close'],timeperiod = 14)
TypeError: 'NoneType' object is not subscriptable
KeyError: 'NSE:UJJIVAN'
UJJIVAN … name has been changed, so its giving None in data.
try… UJJIVANSFB