Open danielaird27 opened 3 years ago
I obtain my positions every 5 minutes or so and everything works most of the time but after a random amount of time, I get this error:
Traceback (most recent call last): File "/home/danm/Documents/Trade/trade.py", line 427, in getCurrentPositions positions = ws.get_positions(account_ids[0]) File "/home/danm/.local/lib/python3.9/site-packages/wealthsimple/wealthsimple.py", line 283, in get_positions return response["results"] KeyError: 'results'
What could cause this issue? What are your opinions on how to fix this problem?
Also, once this error occurs once, it will occur every next time I try to obtain my positions (every 5 minutes)
Sounds like a login that hits a timeout. I will look more into this.
I obtain my positions every 5 minutes or so and everything works most of the time but after a random amount of time, I get this error:
Traceback (most recent call last): File "/home/danm/Documents/Trade/trade.py", line 427, in getCurrentPositions positions = ws.get_positions(account_ids[0]) File "/home/danm/.local/lib/python3.9/site-packages/wealthsimple/wealthsimple.py", line 283, in get_positions return response["results"] KeyError: 'results'
What could cause this issue? What are your opinions on how to fix this problem?