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
9 1 2 6

I am getting lot of Eikon errors while requesting data via python API.

I get lot of eikon errors listed below while requesting data from Eikon Python API.

Listed below few examples where I am requesting data from Eikon :

1) ek.get_data(["0#.SPX"],[{'TR.CompanyMarketCap':{'sort_dir':'desc'}}])

2) ek.get_timeseries(df_data['Instrument'].iloc[10:20].to_list(), start_date =datetime.today()+timedelta(-548) ,end_date = datetime.today(),fields = "CLOSE")

Below is the error message whenever it throws error. Error does not come on every request I make, but error causing or hampering during production hours (due to error I had to reload the full model from start to achieve the desired output).

I use both ways to import eikon (either import refinitiv.dataplatform.eikon as ek OR import eikon as ek). Error come both cases.


Error message :

"raise EikonError(int(server_response['ErrorCode']), error_message)

eikon.eikonError.EikonError: Error code 2504 | UDF Core request failed. Gateway Time-out."



eikon-data-apirefinitiv-dataplatform-eikon#technology
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 @Wasim Akram ,

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 on the left side of the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS

@Wasim Akram

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

Upvote
Accepted
14.2k 30 5 10

Hi @Wasim Akram ,

Sorry to hear that you're facing this issue. Regarding the error code 401, could you please double-check that you are running your python code on the same physical machine where your Eikon/Workspace is running. Eikon proxy is part of your desktop.

See Eikon Data API Quick Start guide for Windows on how to create your valid API Key.

If the issue persists, review article Eikon Data API(Python) Troubleshooting | Refinitiv for the steps to troubleshoot.

Hope that this information is of help

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.

Upvotes
79.2k 251 52 74

@Wasim Akram

Thanks for reaching out to us.

I tested the code several times and I can get the data properly.

According to the error message, it could be a problem in the Eikon process or the request may be timeout.

You can enable logging in the API by using the following code to verify which request message that causes this exception.

ek.set_log_level(1)

The output looks like this:

1676010982315.png

You may need to contact the Eikon support team directly via MyRefinitiv to verify if there is any issue in Eikon.

I hope that this information is of help.


1676010982315.png (68.4 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.

Upvotes
9 1 2 6

That doesn't help. I am getting errors. Below is new line on the error for same kind of request (i.e, ek.get_..........)


eikon.eikonError.EikonError: Error code 401 | Eikon Proxy not running or cannot be reached. Please read the documentation on troubleshooting

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.

Upvotes
9 1 2 6

Adding to above, below code given the error.

df_marketcap, _ = ek.get_data(["0#.STOXX50E"],[{'TR.CompanyMarketCap':{'sort_dir':'desc'}}])

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.

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.