Open gflores87 opened 5 years ago
Yes this looks like a bug. Another issue with this is that IntradayBarRequest
can set overrides to update the number of fields returned so by selecting with the preset flds = ['open', 'high', 'low', 'close', 'volume', 'numEvents']
these extra fields would be ignored.
Appreciate the feedback. I took the liberty to change my code for bdib to this:
if len(data) == 0:
data = pd.DataFrame()
else:
data = pd.DataFrame(data).set_index('time').sort_index().loc[:, flds]
return data
this way, it won't crash on an empty data
Code Sample, a copy-pastable example if possible
Problem description
As of April 22nd at 8:03EST, the request for the intraday trade prints for SPX Index is empty. There's nothing wrong with that, the issue here is that the code won't return an empty dataset. Instead it will crash. Specifically, it will crash trying to execute this line from file pdblp.py, method bdib:
data = pd.DataFrame(data).set_index('time').sort_index().loc[:, flds]
Error raised:
This is the content from debug = True
Expected Output
equity = []
Version Information
0.1.8