question

Upvotes
Accepted
3 0 2 2

EikonError: Error code 401 | Eikon Proxy not running or cannot be reached. Please read the documentation on troubleshooting

Hi, good morning, I'm trying to run a refinitiv api from jupyter notebook and I'm getting connection errors.

Important: I am doing this with the refinitiv desktop application open.

Below I show the code:


import eikon as ek
ek.set_log_level(1)
ek.set_app_key('********************')

1692046258924.png

So far I'm not sure if it worked correctly. Please, if someone can confirm for me, I would appreciate it.


df,e = ek.get_data(['LSEG.L'], ['TR.RIC'])
print(df)


1692046538522.png


Additionally, based on the answer to this forum question: https://community.developers.refinitiv.com/questions/91124/shown-up-eikonerror-error-code-401-eikon-proxy-not.html


I went to troubleshoot the troubleshoot and ran the following tests: https://developers.refinitiv.com/en/article-catalog/article/eikon-data-api-python-troubleshooting-refinitiv


6. Open http://localhost:9000/ping?all on a web browser.

{"port":9000,"mode":"eikon4","pid":****,"hasSecure":true,"startedTime":"Mon Aug 14 2023 12:51:16 GMT-0300 (Hora estándar de Argentina)","subApps":[{"path":"/heap"},{"path":"/ping"},{"path":"/sxs","data":{"hasSecure":true,"sxsApps":{}}},{"path":"/api"},{"path":"/sxs/v1/services/messenger"}]}


7. Open http://localhost:9060/api/status on a web browser.

{"statusCode":"ST_PROXY_READY","version":"3.5.4-eikon4"}


both seem to be correct.


But when I try the following:

1.2.3) Verify that Refinitiv Workspace and Data API Proxy service are running properly:

(http://localhost:9060/api/ or http://localhost:9000/api/)

{"code":500,"message":"Cannot find module \".\"","statusMessage":"Internal Server Error"}


And the truth is that I don't know what else to do. I don't know if it's a configuration problem, something from a firewall that is blocking it or a proxy (which are already issues in which I have no knowledge).


Please, if anyone has any idea where to go I would appreciate it.


Thank you!!








eikon-data-api#technology#producterror-401
1692046258924.png (116.6 KiB)
1692046538522.png (78.0 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.

Upvotes
Accepted
87.3k 294 53 79

@jfcubells

Yes, the issue should be investigated by the Eikon or Workspace support team.

This is how the Eikon Data API connects to the server. Eikon Data API retrieves data through the Eikon API Proxy.

1692178689674.png

The API and PowerShell can connect to the Eikon API Proxy on http://localhost:9060 but the Eikon API Proxy responded with the 500 getaddrinfo ENOTFOUND error.

The Eikon support team should check why the Eikon API Proxy returns this error.

You may check with this command. I am not sure if it will relate to the problem.

Invoke-WebRequest -Method GET -Uri https://amers1-apps.platform.refinitiv.com

1692179246605.png



1692178689674.png (13.9 KiB)
1692179246605.png (62.1 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.

Upvotes
87.3k 294 53 79

@jfcubells

Thank you for reaching out to us.

You can test the request by running the following command in PowerShell.

                
  1. (Invoke-WebRequest -Method POST -Body (@{"AppKey"="<app key>";"AppScope"="trapi";"ApiVersion"="1";"LibraryName"="RDP Python Library";"LibraryVersion"="1.1.7"}|ConvertTo-Json) -Uri http://127.0.0.1:9060/api/handshake -ContentType application/json)

Change "<app key>" to your application key.

The response looks like this:

1686623166533.png

If you got the same error, please contact the Eikon support team direclty via MyRefinitiv to verify your profile settings.

1692069900655.png


1692069900655.png (95.4 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.

Upvotes
3 0 2 2

Hello Jirapongse,


I tried the proposed code in powershell and I get the same error:


1692121042200.png


Should I contact MyRefinitiv directly or can you think of something else that might be going on?


Thank you!


1692121042200.png (79.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.

Upvotes
3 0 2 2

Hello! Thank you very much for the reply.


When I run the code you sent me, I get:

1692363003780.png

Which is the same as what you received.


But I don't quite understand what I should do next. If I run the above code again, it still gives me the same error:


1692363076890.png


I am doing something wrong? What do you recommend?


Thanks!!



1692363003780.png (54.9 KiB)
1692363076890.png (29.2 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.

Upvotes
15.6k 33 5 10

Hi @jfcubells ,

There are numerous reasons why an HTTP request may occasionally fail. If this happens randomly and infrequently, a simple workaround is to catch the error and re-request the data. If this happens frequently or if you're able to consistently reproduce the problem, I suggest opening a support case with Refinitiv Helpdesk. Refinitiv Support can be reached by calling the Helpdesk number in your country, using Contact Us capability in Eikon application or by visiting MyRefinitiv.

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.