Python Forum

Full Version: How would I go about this error?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Output:
Exception in thread Thread-4: Traceback (most recent call last): File "C:\Users\zenfi\AppData\Local\Programs\Python\Python39\lib\threading.py", line 954, in _bootstrap_inner self.run() File "C:\Users\zenfi\AppData\Local\Programs\Python\Python39\lib\threading.py", line 892, in run self._target(*self._args, **self._kwargs) File "C:\Users\zenfi\OneDrive\Desktop\Everything Else\Python\3 Candles\3.4.py", line 283, in liveTimer modelLive(app) File "C:\Users\zenfi\OneDrive\Desktop\Everything Else\Python\3 Candles\3.4.py", line 236, in modelLive df = dataDataframe(app,tickers,ticker) File "C:\Users\zenfi\OneDrive\Desktop\Everything Else\Python\3 Candles\3.4.py", line 106, in dataDataframe df = pd.DataFrame(TradeApp_obj.data[symbols.index(symbol)]) KeyError: 0
Where should I start to look? I've been trying to google it, but the examples are over my head
Start at the bottom most line. You are creating a dataframe from TradeApp_obj.data and it is causing a key error. Look at that data and hopefully will be obvious.