EikonError: Error code 408 | UDF timeout occured. The operation was canceled.
Hi,
I get the following error while conducting a heavy loop:
The loop I am conducting looks like this:
I dívided the ~12,000 firms to groups of 500 to avoid the limit for 10,000 data points per search since I search with 17 fields/data items. How could I best implement the search to all of the 12,000 firms or fix the error occuring?
Many thanks for any advice!
Best Answer
-
Hi @CodeWave
You can use try, except code block to handle error.
try:
df,err = ek.get_data(...)
except ek.EikonError:
//do something, perhaps retry the request again after some period of time0
Answers
-
Hi,
Ok. Thanks! But what is causing the problem so I can prevent the error in the first place? Meanwhile, I will try to make a try-expect structure to handle the issue.
0 -
Hi @CodeWave
Have you tried adding a sleep() between each get_data() call?
I am not an expert on the inner workings of the Eikon API, however, the trace you shared mentions server errors around when the json request is sent to the server.
0 -
There are a lot of possible factors such as network, service availability on server side, etc...
So implementing try, except code block is safer.
Please also note that there is a 5-requests-per-second limitation as well, (please review the API limitation document at this URL, https://developers.refinitiv.com/eikon-apis/eikon-data-api/docs?content=49692&type=documentation_item
0 -
Hi,
Okay. Could you provide a short example or refer to a thread where there is an example provided of such a try-expect structure that works efficiently?
Many thanks.
0 -
No, I had not tried. Thanks for the tip! I think i will try using a try-expect structure and also use sleep between each iteration for chunked firm lists. We'll see how that works out.
0 -
Hi @CodeWave
The example to catch eikonError is provided, however how to handle it really depends on app developer to handle it in their app logic.
This is an example
gotData = False
while not gotData:
try:
df,err = ek.get_data(...)
gotData = True
except ek.EikonError:
time.sleep(3)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 中文论坛