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
73 1 4 6

"code":500,"message":"unable to get local issuer certificate"

Started today. Here is the console output:

2020-09-03 14:13:42,198 pyeikon INFO     Set App Key: None
2020-09-03 14:13:46,247 pyeikon INFO     Response : 500 - {"code":500,"message":"Cannot find module \".\"","statusMessage":"Internal Server Error"}
2020-09-03 14:13:46,247 pyeikon INFO     Port 9000 was retrieved from .portInUse file
2020-09-03 14:13:46,247 pyeikon INFO     Try to handshake on url http://localhost:9000/api/handshake...
2020-09-03 14:13:46,258 pyeikon INFO     Response : 400 - Handshake payload is invalid.
2020-09-03 14:13:46,259 pyeikon INFO     Set Proxy port number to 9000
2020-09-03 14:13:50,287 pyeikon INFO     Checking port 9000 response : 500 - {"code":500,"message":"Cannot find module \".\"","statusMessage":"Internal Server Error"}
2020-09-03 14:13:50,287 pyeikon INFO     Port 9000 was retrieved from .portInUse file
2020-09-03 14:13:50,287 pyeikon INFO     Try to handshake on url http://localhost:9000/api/handshake...
2020-09-03 14:13:50,529 pyeikon INFO     Response : 500 - {"code":500,"message":"unable to get local issuer certificate","statusMessage":"Internal Server Error"}
2020-09-03 14:13:50,529 pyeikon INFO     Application ID: ***
2020-09-03 14:13:50,529 pyeikon INFO     Port 9000 on local proxy was detected
2020-09-03 14:13:50,530 pyeikon INFO     Set timeout to 600 seconds
2020-09-03 14:13:50,726 pyeikon ERROR    Error code 500 | Server Error: {"code":500,"message":"unable to get local issuer certificate","statusMessage":"Internal Server Error"}

http://localhost:9000/ping?all output:

{"port":9000,"mode":"eikon4","pid":12480,"hasSecure":true,"startedTime":"Thu Sep 03 2020 14:01:55 GMT+0300 (Russia TZ 2 Standard Time)","subApps":[{"path":"/heap"},{"path":"/ping"},{"path":"/sxs","data":{"hasSecure":true,"sxsApps":{}}},{"path":"/api"},{"path":"/sxs/v1/services/messenger"}]}

Already tried to clean Eikon cache and to reboot PC with no success.

I'm siting behind the corporate firewall.

----

Tried to run with the clean virtualenv and latest Eikon. It doesn't find the .portInUse (while 1.1.2 version finds them, see the log above):


Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import eikon as ek
>>> ek.__version__
'1.1.5'
2020-09-03 15:44:06,162 pyeikon INFO     Timeout on checking port 9060
2020-09-03 15:44:06,163 pyeikon INFO     Warning: file .portInUse was not found. Try to fallback to default port number.
2020-09-03 15:44:06,166 pyeikon INFO     Try defaulting to port 9000...
2020-09-03 15:44:16,170 pyeikon INFO     Timeout on checking port 9000
2020-09-03 15:44:16,171 pyeikon INFO     Try defaulting to port 36036...
eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-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.

@pierre.faurel, Can you please advise on this issue.

Is there any option to disable SSL in eikon module?

I tried

ek.get_desktop_session()._http_session.verify = False

but it doesn't help, still get

Error code 500 | Server Error: {"code":500,"message":"unable to get local issuer certificate","statusMessage":"Internal Server Error"}

+ stack trace

  File "e:\bin3\Python36\lib\site-packages\eikon\data_grid.py", line 189, in get_data
    result = eikon.json_requests.send_json_request(_endpoint, payload, debug=debug)
  File "e:\bin3\Python36\lib\site-packages\eikon\json_requests.py", line 131, in send_json_request
    _raise_for_status(response)
  File "e:\bin3\Python36\lib\site-packages\eikon\json_requests.py", line 254, in _raise_for_status
    raise EikonError(response.status_code, error_msg)
eikon.eikonError.EikonError: Error code 500 | Server Error: {"code":500,"message":"unable to get local issuer certificate","statusMessage":"Internal Server Error"}


Again, this used to work for several years, until today.

So it seems not a SSL error in the eikon module itself when connecting localhost, but it gets a response from the proxy with this error message.

Show more comments
Upvotes
Accepted
4.3k 2 4 5

Hi,

As mentionned beside, the response {"code":500,"message":"unable to get local issuer certificate","statusMessage":"Internal Server Error"} is received from the proxy.

We assume that could be caused by a security setting specific to you domain and/or network.

To isolate your issue, could you run following code and share the result (take care to hide your app_key).

import requests
import eikon as ek

r = requests.get(url="http://localhost:9060/api/status")
print("STATUS:\n", r.text)

body = {
    "AppKey": <your app key>,
    "AppScope": "rapi",
    "ApiVersion": "1",
    "LibraryName": "Eikon Python Library",
    "LibraryVersion": ek.__version__
}
r = requests.post(url="http://localhost:9060/api/handshake",
                  headers={"Content-Type": "application/json"},
                  json=body)
print("HANDSHAKE:\n", r.text)


In the meantime, a 1.1.6.post2 eikon was released.
It shouldn't fix your issue but the test will be useful if you agree to upgrade to ("pip install --no-cache-dir --upgrade eikon").


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.

Upvotes
22.1k 59 14 21

Hi @ivan.cherkasov, I myself have been having a lot of issues with latest package and have asked for input from the developer on your issue. Meanwhile, can you please try using v1.1.2 and see if it is still not working for you.

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.

Problem is with 1.1.2. Latest package was for illustration purposes, and has different error.

Upvotes
4.3k 2 4 5

Hi,

I see different points to check :

  1. The message "Set App Key: None" => did you call ek.set_app_key() with a value different than None ? (did it work before ?)
  2. the response {"code":500,"message":"unable to get local issuer certificate","statusMessage":"Internal Server Error"} is not expected from the proxy.
    Do you have security settings in your domain/network that involve specific certificate ?

In addition, on our side, we detected an issue with Python 3.8 and we're investigating to find the root cause. (all HTTP requests take 100 times more latency and currently fail in TimeoutError)

So, in the meantime, you can switch to Python 3.7 (issue not reproduced with this 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.

* "Set App Key: None" - that's odd, key is set using ek.set_app_key("..."), it is not empty and it was working before

* python and eikon version are the following:

Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 13:35:33) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import eikon as ek
>>> ek.__version__
'1.1.2'
>>> ^Z

* "Do you have security settings in your domain/network that involve specific certificate" - that's for sure, IT is investigating; but so far issue is not pinpointed.

with debug enable, part 1

2020-09-03 19:43:35,294 pyeikon INFO     Set App Key: None
2020-09-03 19:43:35,302 urllib3.connectionpool DEBUG    Starting new HTTP connection (1): localhost:9000
2020-09-03 19:43:37,312 urllib3.connectionpool DEBUG    http://localhost:9000 "GET /api/v1/data HTTP/1.1" 307 68
2020-09-03 19:43:37,313 urllib3.connectionpool DEBUG    Starting new HTTP connection (1): localhost:9060
2020-09-03 19:43:39,336 urllib3.connectionpool DEBUG    http://localhost:9060 "GET /api/v1/data HTTP/1.1" 307 40
2020-09-03 19:43:39,341 urllib3.connectionpool DEBUG    http://localhost:9060 "GET /api/ HTTP/1.1" 500 89
2020-09-03 19:43:39,342 pyeikon INFO     Response : 500 - {"code":500,"message":"Cannot find module \".\"","statusMessage":"Internal Server Error"}
2020-09-03 19:43:39,342 pyeikon INFO     Port 9000 was retrieved from .portInUse file
2020-09-03 19:43:39,343 pyeikon INFO     Try to handshake on url http://localhost:9000/api/handshake...
2020-09-03 19:43:39,346 urllib3.connectionpool DEBUG    http://localhost:9000 "POST /api/handshake HTTP/1.1" 307 70
2020-09-03 19:43:39,350 urllib3.connectionpool DEBUG    http://localhost:9060 "POST /api/handshake HTTP/1.1" 400 29
2020-09-03 19:43:39,351 pyeikon INFO     Response : 400 - Handshake payload is invalid.

part 2

2020-09-03 19:43:39,351 pyeikon INFO     Set Proxy port number to 9000
2020-09-03 19:43:43,379 pyeikon INFO     Checking port 9000 response : 500 - {"code":500,"message":"Cannot find module \".\"","statusMessage":"Internal Server Error"}
2020-09-03 19:43:43,379 pyeikon INFO     Port 9000 was retrieved from .portInUse file
2020-09-03 19:43:43,382 pyeikon INFO     Try to handshake on url http://localhost:9000/api/handshake...
2020-09-03 19:43:43,666 pyeikon INFO     Response : 500 - {"code":500,"message":"unable to get local issuer certificate","statusMessage":"Internal Server Error"}
2020-09-03 19:43:43,667 pyeikon DEBUG    Response 500 on handshake port 9000 : {"code":500,"message":"unable to get local issuer certificate","statusMessage":"Internal Server Error"}
2020-09-03 19:43:43,672 pyeikon INFO     Application ID: ****
2020-09-03 19:43:43,672 pyeikon INFO     Port 9000 on local proxy was detected
2020-09-03 19:43:43,673 pyeikon INFO     Set timeout to 600 seconds
2020-09-03 19:43:43,673 pyeikon DEBUG    Request:{'Entity': {'E': 'DataGrid_StandardAsync', 'W': {'requests': [{'instruments': ['0#ADSGn*.EX'], 'fields': [{'name': 'EXPIR_DATE'}, {'name': 'STRIKE_PRC'}, {'name': 'PUTCALLIND'}]}]}}}

part 3

2020-09-03 19:43:43,676 urllib3.connectionpool DEBUG    http://localhost:9000 "POST /api/v1/data HTTP/1.1" 307 68
2020-09-03 19:43:43,681 urllib3.connectionpool DEBUG    http://localhost:9060 "POST /api/v1/data HTTP/1.1" 307 43
2020-09-03 19:43:43,862 urllib3.connectionpool DEBUG    http://localhost:9060 "POST /api/udf HTTP/1.1" 500 103
2020-09-03 19:43:43,863 pyeikon DEBUG    HTTP Response code: 500
2020-09-03 19:43:43,866 pyeikon DEBUG    HTTP Response: {"code":500,"message":"unable to get local issuer certificate","statusMessage":"Internal Server Error"}
2020-09-03 19:43:43,866 pyeikon ERROR    Error code 500 | Server Error: {"code":500,"message":"unable to get local issuer certificate","statusMessage":"Internal Server Error"}
Traceback (most recent call last):

part 4

  File "e:\bin3\Python36\lib\site-packages\eikon\data_grid.py", line 189, in get_data
    result = eikon.json_requests.send_json_request(_endpoint, payload, debug=debug)
  File "e:\bin3\Python36\lib\site-packages\eikon\json_requests.py", line 130, in send_json_request
    _raise_for_status(response)
  File "e:\bin3\Python36\lib\site-packages\eikon\json_requests.py", line 253, in _raise_for_status
    raise EikonError(response.status_code, error_msg)
eikon.eikonError.EikonError: Error code 500 | Server Error: {"code":500,"message":"unable to get local issuer certificate","statusMessage":"Internal Server Error"}
Upvotes
73 1 4 6

At the moment api proxy is working, so can't really run this code snippet.

However, there is smth. strange I noticed: if terminal is uninstalled and than installed back from the offline installer, proxy works. But after terminal cache is cleared ("Clear Cache" app) proxy immediately breaks with the "code":500 error.


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.

Upvotes
73 1 4 6

I still experience this issue after software updates. The workaround is to reinstall the Eikon terminal.

Question from our IT: do you have a list of URLs/domains/addresses that should be excluded from the HTTPS inspection in order to run the Eikon proxy?

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.