Server Error: code 500 by downloading the data from eikon

I am using Eikon Data API in Python as follows:

import eikon as ek
ek.set_app_key('.....')
ek.get_news_headlines('R:LHAG.DE', date_from='2019-03-06T09:00:00',
date_to='2019-03-06T18:00:00')

and get the following error message:

Error code 500 | Server Error: {"code":500,"message":"getaddrinfo
ENOTFOUND emea1.apps.cp.thomsonreuters.com emea1.apps.cp.
thomsonreuters.com:443","statusMessage":"Internal Server Error"}

A similar problem is described here .

Probably, the following infos are requorde:

eikon==1.1.7

nest-asyncio==1.3.3

Eikon-Desktop: 4.0.52

and http://localhost:9000/ping?all supplies

image

Best Answer

  • pf
    pf LSEG
    Answer ✓

    Hi,

    The issue described here is a connect ETIMEDOUT and was because of nest-asyncio 1.4.1

    Your issue is a getaddrinfo ENOTFOUND (It could be caused by DNS or proxy)

    Could you apply following steps :

    1. Open http://localhost:9000/api/status to check if API Proxy is running.
    2. Verify if Refinitiv server is authorized by your proxy
      Run cmd.exe then type "ping emea1.apps.cp.thomsonreuters.com", you should have following result:
      Reply from 159.220.1.19: bytes=32 time=34ms TTL=242
    3. In your script, activate verbose log and when you set app_key, you can test if connection is up before continue as follow:
    ek.set_log_level(1)ek.set_app_key('.....')state = ek.get_desktop_session().get_open_state()if state == ek.Session.State.Open:
        ek.get_news_headlines('R:LHAG.DE', date_from='2019-03-06T09:00:00', date_to='2019-03-06T18:00:00')

    4. Lastly, if you can define environment variable HTTPX_LOG_LEVEL=trace then run your script, we'll have full logs to investigate and check what's the root cause of this error code 500

    FYI, a new version (1.1.8) was just released on pypi.org.

Answers