ValueError when retrieving timeseries

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).
Best Answer
-
Hi @gabriel.g
Thanks for reporting this.
I can reproduce the same error.
I cannot confirm if this is an intended behavior but I will inform product manager to be aware of this issue.
0
Answers
-
Great, thank you!
As already mentioned it's mainly a problem when requesting quotes for a bunch of rics at once.
The ValueError gives no insight on which instrument caused the error, so I have to sequentially send a request for every single ric to find the culprit.
I'll probably write some kind of binary-search algorithm to circumvent it, but I'd still appreciate if you informed me on any news on this issue (e.g. by posting another reply into this thread).0 -
In the case for this issue, solution is Eikon Python Dev released the fix server-side
0
Categories
- All Categories
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 33 Data Model Discovery
- 682 Datastream
- 1.4K DSS
- 613 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 248 ETA
- 552 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.8K Refinitiv Data Platform
- 625 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 83 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛