Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 0 0

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!

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
capt7.png (23.2 KiB)
capt8.png (19.3 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@CodeWave

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If so please can you click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question.

Thanks,

AHS

Upvotes
Accepted
18.2k 21 13 21

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 time
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

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.

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


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.

Show more comments
Upvotes
25.3k 87 12 25

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.