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."



Best Answer

Answers

  • anonymous user

    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.

  • 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

  • Adding to above, below code given the error.

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