Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
4 4 7 11

Error: no proxy address identified.

Have seen a couple of threads popping up with similar issues related to proxy, this is new to me:

2022-08-25 08:09:58,324 P[19480] [MainThread 10120] Error: no proxy address identified. Check if Eikon Desktop or Eikon API Proxy is running. 

2022-08-25 08:09:58,355 P[19480] [MainThread 10120] Error on handshake url http://127.0.0.1:None/api/handshake : UnsupportedProtocol("Request URL is missing an 'http://' or 'https://' protocol.") 

2022-08-25 08:09:58,358 P[19480] [MainThread 10120] Error on handshake url http://127.0.0.1:None/api/handshake : UnsupportedProtocol("Request URL is missing an 'http://' or 'https://' protocol.") 

2022-08-25 08:09:58,370 P[19480] [MainThread 10120] Port number was not identified, cannot send any request 

2022-08-25 08:09:58,389 P[19480] [MainThread 10120] Eikon Proxy not running or cannot be reached. Please read the documentation on troubleshooting 

Have otherwise been using the same code for the past couple of weeks and it has been running without issues. Did Eikon change something?

Appreciate any help, thanks.

eikon-data-api
icon clock
10 |1500

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

Upvote
Accepted
81.3k 267 53 76

We checked and found that this issue relates to the proxy setting.

We need to check the connections by running the following code.

First, test with the requests library.

import requests
url = 'http://127.0.0.1:9060/api/status'
x = requests.get(url)
print(x.text)

Then, test with the httpx library. The Eikon Data API depends on this library.

import httpx
timeout = 60
http_session = httpx.AsyncClient(
            headers={"Accept": "application/json"},
            timeout=timeout,
        )
request_response = await http_session.request('GET','http://127.0.0.1:9060/api/status')
request_response.content

The output is:

1661833932215.png

However, in the client's environment, the GET request didn't work. The client can solve the problem by setting a proxy server in the GET request.

import requests
url = 'http://127.0.0.1:9060/api/status'
proxies = {
   'http': '',
   'https': ''
}
x = requests.get(url, proxies=proxies)
print(x.text)

Therefore, when using Eikon Data API, the client also needs to set a proxy server in the HTTP_PROXY operating system environment variable. For example:

import eikon as ek
import os
 
#ek.set_log_level(1)
os.environ['HTTP_PROXY']=http://127.0.0.1:8080
os.environ['HTTPS_PROXY']=http://127.0.0.1:8080
ek.set_app_key('<app key>')

1661833932215.png (33.7 KiB)
icon clock
10 |1500

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

Thanks, @Jirapongse. Basically, the tests went well -- however the API still has an issue while trying to connect via proxy:

1662480000717.png

1662480000717.png (84.5 KiB)
Upvotes
81.3k 267 53 76

@wesley.ng

Really sorry for the issue you are facing, let me see if I can help you in resolving this.

First, you need to check that Eikon or Refinitiv Workspace is running properly. For Eikon, you can refer to the Eikon Data API(Python) Troubleshooting guide. For Refinitiv Workspace, please check the node-sxs.<date>.p<pid>.log in the Refinitiv Workspace Logs folder. Please refer to the answer to this question.

You can check the API proxy is running by using a web browser to access the following URLs.

http://127.0.0.1:<port>/ping?all

1661399793781.png

http://127.0.0.1:<port>/api/status

1661399695891.png

You can check a TCP port used by API proxy from the log file.

If Eikon or Refinitiv Workspace is running properly, please enable logging in Eikon Data API by using the following command.

ek.set_log_level(1)

You can share the log file when the problem occurred.

I hope this will help.


1661399793781.png (21.5 KiB)
1661399695891.png (7.6 KiB)
icon clock
10 |1500

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

Hi, it looks like I'm unable to ping the API proxy:

1661410293034.png


But the status is fine:

1661410321446.png

1661410293034.png (7.4 KiB)
1661410321446.png (8.5 KiB)

@wesley.ng

You can try TCP 9000 or 9001 port.

http://127.0.0.1:9000/ping?all

http://127.0.0.1:9001/ping?all

The listening port is defined in the sxs log file.

Hi, it looks like 9000 can be pinged, and 9060 is ST_PROXY_READY, same as the troubleshooting guide: https://developers.refinitiv.com/en/article-catalog/article/eikon-data-api-python-troubleshooting-refinitiv

SxS file looks okay, but still getting proxy-related errors. Attaching full log.

Thank you for your time.

Looks like I'm unable to attach files here - can I have an email to send to?

Thanks.

Show more comments
Upvotes
81.3k 267 53 76

@ssavytskyi

The are two kinds of proxy in this context. The first one is the API proxy run by Eikon or Workspace. The Eikon Data API connects to this API proxy to get data. Typically, the API proxy uses http://127.0.0.1:9060.

Another proxy is a proxy server run by your corporate or IT team.

The HTTP_PROXY and HTTPS_PROXY variables are for the corporate proxy server.

From your output, the Python code can connect to http://127.0.0.1:9060/api/status properly without proxy settings so there is no need to set the HTTP_PROXY and HTTPS_PROXY environment variables.

Please enable logging in Eikon Data API with the following code.

import eikon as ek
ek.set_log_level(1)
ek.set_app_key('<app key>')

Then, please share the log.

icon clock
10 |1500

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

the logs below: its trying to connect via different ports, but still failing

1662479946826.png

1662479946826.png (142.3 KiB)

Please check the version of Eikon Data API and httpx used by the application.

import httpx
import eikon as ek
print(ek.__version__)
print(httpx.__version__)

1661939777037.png

1661939777037.png (5.0 KiB)

eikon: 1.1.10

httpx: 0.23.0

1662479863818.png

1662479863818.png (11.2 KiB)
Show more comments
Upvotes
1 0 0 1

thanks, guys, API working at this point,

So, seems that issue was with Eikon version..

icon clock
10 |1500

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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