When I try to request timeseries via ek.get_timeseries a ValueError is thrown (only for specific stocks/parameters).
Example snippet with traceback:
>>> ek.get_timeseries(rics=['GHG.BH'], fields=['OPEN', 'CLOSE'], count=5) Traceback (most recent call last): File "C:\Program Files (x86)\Python37-32\lib\site-packages\pandas\core\internals\managers.py", line 1677, in create_block_manager_from_blocks make_block(values=blocks[0], placement=slice(0, len(axes[0]))) File "C:\Program Files (x86)\Python37-32\lib\site-packages\pandas\core\internals\blocks.py", line 3265, in make_block return klass(values, ndim=ndim, placement=placement) File "C:\Program Files (x86)\Python37-32\lib\site-packages\pandas\core\internals\blocks.py", line 128, in __init__ "{mgr}".format(val=len(self.values), mgr=len(self.mgr_locs)) ValueError: Wrong number of items passed 1, placement implies 2 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Program Files (x86)\Python37-32\lib\site-packages\eikon\time_series.py", line 206, in get_timeseries data_frame = NiceDataFrame_Formatter(ts_result).get_data_frame() File "C:\Program Files (x86)\Python37-32\lib\site-packages\eikon\time_series.py", line 257, in get_data_frame data_frames, rics, fields = self._get_frame_list() File "C:\Program Files (x86)\Python37-32\lib\site-packages\eikon\time_series.py", line 290, in _get_frame_list df = pd.DataFrame(datapoints, columns=fields) File "C:\Program Files (x86)\Python37-32\lib\site-packages\pandas\core\frame.py", line 439, in __init__ mgr = init_ndarray(data, index, columns, dtype=dtype, copy=copy) File "C:\Program Files (x86)\Python37-32\lib\site-packages\pandas\core\internals\construction.py", line 213, in init_ndarray return create_block_manager_from_blocks(block_values, [columns, index]) File "C:\Program Files (x86)\Python37-32\lib\site-packages\pandas\core\internals\managers.py", line 1687, in create_block_manager_from_blocks construction_error(tot_items, blocks[0].shape[1:], axes, e) File "C:\Program Files (x86)\Python37-32\lib\site-packages\pandas\core\internals\managers.py", line 1716, in construction_error raise ValueError("Empty data passed with indices specified.") ValueError: Empty data passed with indices specified.
It seems like the reason for the error is that there are no up-to-date quotes (latest GHG.BH quote is from 2019-11-04) and the number of returned rows is limited via the count param.
The ValueError is also thrown when data for multiple rics is requested, so one 'bad' ric that has no current quotes crashes the whole batch-query. I am pretty sure that this behaviour is not intended and that it should be fixed.
I've tested it on eikon version 1.0.1 and pre-release 1.1.2b0. If necessary I can provide additional examples (e.g. other rics that cause the same behaviour).