You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_paginate_iter throws KeyError: 'results' when results doesn't exist in resp
To Reproduce
Call list_aggs with "/v2/aggs/ticker/O:SPY230703C00408000/range/5/minute/2023-07-03/2023-07-04"
Expected behavior
IMHO, this is not an error. When there's no results in resp, just skip it, don't throw a key error.
Change for t in decoded[result_key]: to for t in decoded.get(result_key, []): should be enough
Screenshots
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered:
This is fixed via #483 and we'll return an empty array if not results are found. I'll cut a new release shortly. Thanks again for reporting this. I'll followup when the release is out.
Describe the bug
_paginate_iter throws
KeyError: 'results'
whenresults
doesn't exist inresp
To Reproduce
Call
list_aggs
with"/v2/aggs/ticker/O:SPY230703C00408000/range/5/minute/2023-07-03/2023-07-04"
Expected behavior
IMHO, this is not an error. When there's no
results
inresp
, just skip it, don't throw a key error.Change
for t in decoded[result_key]:
tofor t in decoded.get(result_key, []):
should be enoughScreenshots
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: