Python Forum
How would I go about this error?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How would I go about this error?
#1
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
Reply
#2
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.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020