For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 1 1

ENOTFOUND emea1.apps.cp.thomsonreuters.com error when trying to fetch data using python eikon API

Dear colleagues,


I've been trying to use Eikon Data API but can't get it to work but without success. I hope you can help me out. The issue is most likely related to our corporate proxy server.


Here is the stacktrace which i got from setting the log level accordingly:

2021-06-29 23:29:52,310 P[4852] [MainThread 12460] HTTP request response 500: {"code":500,"message":"getaddrinfo ENOTFOUND emea1.apps.cp.thomsonreuters.com emea1.apps.cp.thomsonreuters.com:443","statusMessage":"Internal Server Error"}

2021-06-29 23:29:52,310 P[4852] [MainThread 12460] Response : 500 - {"code":500,"message":"getaddrinfo ENOTFOUND emea1.apps.cp.thomsonreuters.com emea1.apps.cp.thomsonreuters.com:443","statusMessage":"Internal Server Error"}

2021-06-29 23:29:52,311 P[4852] [MainThread 12460] Response 500 on handshake port 9060 : {"code":500,"message":"getaddrinfo ENOTFOUND emea1.apps.cp.thomsonreuters.com emea1.apps.cp.thomsonreuters.com:443","statusMessage":"Internal Server Error"}


It seems like the API Proxy process can't resolve the hostname. Is that process not correcly using the corporate proxy server which I set in the environment variables HTTP_PROXY and HTTPS_PROXY?

I tried searching the forum as well but I couldn't find a suitable solution.


Thank you very much for your help.


Best regards

Stefan

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikon
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
18k 21 12 20

Hi @stefan.litzel

I am sorry, I think I misunderstood your question.

Eikon Data API(Python code) connects to Eikon API Proxy.

You can set Python program to use proxy with the sample code I provided.

However, this would not affect Eikon API Proxy process.


I submitted case no. 10047299 on your behalf to helpdesk.

They will contact you shortly.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
18k 21 12 20

Hi @stefan.litzel

I was able to redirect Eikon Data API request via Fiddler4(acting as proxy) by adding this code:

import os
os.environ['HTTP_PROXY']="http://<ip>:<port>"
os.environ['HTTPS_PROXY']="http://<ip>:<port>"

Assuming that your corporate proxy is running on <ip> and <port> and does not require authentication.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
1 0 1 1

Hi @chavalit.jintamalit

Thank you for your fast response :)

If I understand your answer correctly, you were just using Fiddler to simulate my scenario with a corporate proxy and your advice is to set the environment variables. Please correct me if I am wrong.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
1 0 1 1

I have been trying to upload screenshots, but I always get an error message....
Therefore I provide you links to the pictures:

Imgur: The magic of the Internet

- It includes a screenshot that shows that I have already set the environment variables

- A screenshot from the APIProxy logs of Eikon that shows that the environment variable is also read

- And a screenshot of me trying to connect via python requests module which uses the proxy server correctly to show that the proxy server is working correctly.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea