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

Hi,


I'm trying to run the following Eikon code as I do every week and I'm getting a gateway timeout error. Any suggestions?


f1 = pd.DataFrame()

RIC_List

for ric in RIC_List:

q='R:'+ ric + ' AND Topic:DEAL1 AND Language:LEN'

#print(q)

df = ek.get_news_headlines(q,count=25, date_from='2023-10-27', date_to='2023-11-03')

df1 = df1.append(df)

Best Answer

  • @cole Thanks for your question - I have tried this and it is returning with a smaller amount of rics:

    import pandas as pd
    df1 = pd.DataFrame()

    RIC_List = ['VOD.L','TSLA.O']

    for ric in RIC_List:
        q='R:'+ ric + ' AND Topic:DEAL1 AND Language:LEN'
        #print(q)
        df = ek.get_news_headlines(q,count=25, date_from='2023-10-27', date_to='2023-11-03')
        if len(df):
            df1 = df1.append(df)
            
    df1

    1699289879649.png

    With these parameters it is running for me - you could also code defensively by adding a Try-Except block to trap errors and perhaps re-present the failing calls - see this thread here for an example.

    I hope this can help.

Answers

  • Hi @cole,

    This is usually for calls that are very large. Have you tried it with a RIC_List that only has 1 RIC?
    Also: Can you get any data of any kind from the Eikon Data API? maybe with get_data ? I'm asking to make sure that you are authentificated as need be to start with, before using the ek.get_news_headlines function.