HTTP Request Failed ConnectError ('[SSL: WRONG_VERSION_NUMBER]')

ryan_choi
ryan_choi Newcomer
edited June 10 in Eikon Data APIs

I have set my proxies and gone through the troubleshooting article: https://developers.lseg.com/en/article-catalog/article/eikon-data-api-python-troubleshooting-refinitiv?secureweb=RefinitivWorkspace

I still can't figure out what is the issue here and I'm already on my second app key

Here are some further logs:
2025-06-09 11:37:37,974 P[23400] [MainThread 23428] Reset a Desktop session with new app_key

2025-06-09 11:37:37,979 P[23400] [MainThread 23428] Send GET request to http://127.0.0.1:9007/api/status to detect API Proxy...

2025-06-09 11:37:37,980 P[23400] [MainThread 23428] Request to http://127.0.0.1:9007/api/statusheaders = {'x-tr-applicationid': '<APP_KEY>'}params = None

2025-06-09 11:37:38,692 P[23400] [MainThread 23428] HTTP request failed: ConnectError('[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1028)')

2025-06-09 11:37:38,693 P[23400] [MainThread 23428] Error on checking proxy url http://127.0.0.1:9007/api/status : ConnectError('[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1028)'

2025-06-09 11:37:38,694 P[23400] [MainThread 23428] Retrieved port 9007 value from .portIntUse isn't valid.

2025-06-09 11:37:38,695 P[23400] [MainThread 23428] Warning: file .portInUse was not found. Try to fallback to default port number.

2025-06-09 11:37:38,696 P[23400] [MainThread 23428] Try defaulting to port 9000...

2025-06-09 11:37:38,697 P[23400] [MainThread 23428] Send GET request to http://127.0.0.1:9000/api/status to detect API Proxy...

2025-06-09 11:37:38,698 P[23400] [MainThread 23428] Request to http://127.0.0.1:9000/api/statusheaders = {'x-tr-applicationid': <API_KEY>'}params = None

and Eventually:

2025-06-09 11:37:40,129 P[23400] [MainThread 23428] Default proxy port #9060 failed...

2025-06-09 11:37:40,136 P[23400] [MainThread 23428] Port number was not identified, cannot send any request

2025-06-09 11:37:40,138 P[23400] [MainThread 23428] Received notification for closed streaming session 0

2025-06-09 11:37:40,139 P[23400] [MainThread 23428] Received notification for closed streaming session 0

2025-06-09 11:37:40,141 P[23400] [MainThread 23428] Init a Desktop session with new app_key

FYI:

http://127.0.0.1:9007/api/status is shows me this:

{"statusCode":"ST_PROXY_READY","version":"3.11.0"}

So I know 9007 is the correct port it should be connecting to

Tagged:

Best Answer

  • Gurpreet
    Gurpreet admin
    Answer ✓

    @ryan_choi

    The legacy Eikon data API won't be supported for long, and you will have to migrate to newer libraries. Most of the APIs are backwards compatible, so there should not be much change in the application code.

    I think, the local connection to the API proxy is also being sent through your corporate proxy. If set - please unset the command line variable HTTP_PROXY and HTTPS_PROXY and try again.

Answers

  • Hello @ryan_choi

    Can you please provide more information about your setup. Are you using LSEG Workspace with latest LD Library? Do you have a Corporate system proxy setup? Is this proxy setup as environment variables on the command line?

    The SSL error should not come into play here - it is not an https connection.

  • ryan_choi
    ryan_choi Newcomer

    I am using a corporate system proxy setup with LSEG workspace, but thr LD library unfortunately cannot be installed due to an issue installing metadata numpy in the lseg-data package which is odd. I have set up the environment variables in my code under HTTP_PROXY, HTTPS_PROXY, http_proxy, and https_proxy. Right now, I am currently using the Eikon Data API. However, several weeks ago I was able to get a connection using Eikon Data API and go through the tutorials such as getting the ISIN # for some symbols.

  • ryan_choi
    ryan_choi Newcomer

    I set the proxy like this:

    os.environ['http_proxy']=….

  • ryan_choi
    ryan_choi Newcomer

    Ok I see. I unset the corporate proxy and it now works. Thank you so much!