P[89632] [MainThread 87800] Failed to decode response to json:

I have no idea what's going on here, it was working fine a week ago. Here's the exact query i'm trying to run:

ek.get_timeseries('NTR.TO',start_date='2018-03-26',end_date= '2021-03-26', interval = 'weekly')

Best Answer

  • @apalarajah your code works fine - please see the result below. Can I ask you shut Eikon down and reopen it as the connection to the API proxy may not have completed fully due to the authentication outage earlier. It should then work fine. I hope this can help.

    image

Answers

  • Hi I'm getting the same error where the code returned (None, None) while I was using Eikon. The code is pretty standard and I've set app key before hand. Things I've tried so far:

    1) Restarting Refinitiv desktop workspace (it seemed without that logged in, the eikon API would not work

    2) re-run the code say 5-10 times...the tricky thing is that sometimes (2/10) it does return a dataframe, while other cases it simply returns None and the error


    [MainThread 53780] Failed to decode response to json:

    import eikon as ek
    ek.set_app_key(XXXYXYXYXYXYXY)

    rdp_df = ek.get_data(['SNOW.K'],
    ['TR.CLOSEPRICE.Date',
    'TR.OPENPRICE(Adjusted=1)',
    'TR.HIGHPRICE(Adjusted=1)',
    'TR.LOWPRICE(Adjusted=1)',
    'TR.CLOSEPRICE(Adjusted=1)',
    ], {
    'SDate': '20020729', 'EDate': '20211102', 'Frq': 'D'})