how to "catch" statusCode == 'Error' with normalization = false flag
dataFrame = ek.get_timeseries(rics=["INDQ19","IPCZ9","INDQ20"], start_date="2018-12-21 00:00:00", end_date="2018-12-21 00:00:01", interval="daily", normalize=False, raw_output=1)
I'm getting the response for INDQ19 and INDQ20.
But there is nothing for "IPCZ9" . Only print to the std output "Error with IPCZ9: No data available for the requested date range".
Is there a way to parse this error from the dataFrame?
Note: when I request only 1 ticker at a time, python module raises EikonError. And I can catch it and parse the description. For multiply tickers it just prints to the std.
Best Answer
-
Please see my answer to a similar question on this thread.
0
Answers
-
does it log something by default?
0 -
@alex, how can I make eikon to log the error to the file?
I see there is set_log_level function.
>>> ek.set_log_path("../log")
>>> ek.set_log_level(logging.DEBUG)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files (x86)\Python37-32\Lib\site-packages\eikon\Profile.py", line 133, in set_log_level
get_profile().set_log_level(level)
File "C:\Program Files (x86)\Python37-32\Lib\site-packages\eikon\Profile.py", line 296, in set_log_level
__handler = logging.handlers.RotatingFileHandler(__filename, mode='a', maxBytes=MAX_LOG_SIZE,
NameError: name 'MAX_LOG_SIZE' is not definedWhat am I doing wrong?
0 -
You're not doing anything wrong. There's a bug in Profile.py module, which results in the error you saw and which makes it not possible to output the log to a file using methods in eikon library v0.1.13. The bug is fixed in v0.1.14, but this update hasn't been published yet and I'm not sure when it will be published. Currently the only way you can catch the error logged for an individual RIC when using get_timeseries method with multiple RICs, is by implementing a handler for the logger as described in the article I referenced in my response on the other thread that I mentioned earlier.
0 -
understood. thank you
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 162 App Studio
- 4 Block Chain
- 5 Bot Platform
- 17 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 370 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛