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

Connecting Phython interface to Eikon

This is a client's question:

I'm trying to connect my python interface to Eikon,
following the next tutorial :
https://developers.refinitiv.com/article/eikon-data-apipython-troubleshooting-refinitiv.

After seeing a lot of forums, i come to you, because i can't solve my problem.
Every files seem good (.portUse and Sxs), it works on Excel. After run this python script :

import eikon
eikon.set_port_number(9000)
eikon.set_app_key("...")

("..." is replaced by the key generated inside Eikon)
Python writes me this :

2020-08-20 14:30:55,348 P[6728] [MainThread 16184] Error: no proxy address identified.
Check if Eikon Desktop or Eikon API Proxy is running.
2020-08-20 14:30:55,348 P[6728] [MainThread 16184] Port number was not identified, cannot send any request
2020-08-20 14:30:55,348 P[6728] [MainThread 16184] Port number was not identified.
Check if Eikon Desktop or Eikon API Proxy is running.
Traceback (most recent call last):
File "C:/Users/kespalivet/Desktop/Size Premium/python/labo.py", line 17, in <module>
eikon.set_app_key("e62adde5e26c4b16a2c5fe0272f7746ecde8914b")
File "C:\Users\kespalivet\Documents\Python\venv\lib\site-packages\eikon\Profile.py", line 38, in set_app_key
get_profile().set_app_key(app_key)
File "C:\Users\kespalivet\Documents\Python\venv\lib\site-packages\eikon\Profile.py", line 233, in set_app_key
self.check_profile()
File "C:\Users\kespalivet\Documents\Python\venv\lib\site-packages\eikon\Profile.py", line 346, in check_profile
raise EikonError(-1, 'Port number was not identified. Check if Eikon Desktop or Eikon API Proxy is running.')
eikon.eikonError.EikonError: Error code -1 | Port number was not identified. Check if Eikon Desktop or Eikon API Proxy is running.

Process finished with exit code 1

Do you have any idea, how can i solve this problem?

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apiapiconnection
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.

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question. Thanks, AHS

@jeane.samson.refinitiv

Hi,

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

Upvotes
Accepted
22.1k 59 14 21

From the attached logs, it shows that API proxy is listening on port 9000.

[2020-08-24 09:27:44.509|1|api-svc|1|INFO] Listening to port=9000

Can you confirm that this is also same in the .portInUse file located at C:\Users\<WindowsUser>\AppData\Roaming\Thomson Reuters\Eikon API Proxy\

Does user see this screen when navigating to: http://localhost:9000/ping?all :


1598284890947.png (27.3 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 Gurpreet,


As per client-

It is what i currently find on the my port 9000 (going at http://localhost:9000/ping?all) :
{"port":9000,"mode":"eikon4","pid":14628,"hasSecure":true,"startedTime":"Tue Aug 25 2020 16:34:46 GMT+0200 (Paris, Madrid (heure d’été))","subApps":[{"path":"/heap"},{"path":"/ping"},{"path":"/sxs","data":{"hasSecure":true,"sxsApps":{}}},{"path":"/api"}]}

And my file .portInUse is also on port 9000.

Gurpreet avatar image Gurpreet jeane.samson.refinitiv

Thanks. Looks like Eikon side is working. What is the version of Eikon library you are using. If using > 1.1.2, can you install the v1.1.2 and try again.

pip install eikon==1.1.2
Upvote
22.1k 59 14 21

Hello @jeane.samson.refinitiv, Please ask client to follow this Eikon API troubleshooting article. If they are still unable to solve the issue, then ask them to provide the log files as shown in the article.

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.

Can you check the log I provided above?

Upvotes

After run this python script :

import eikon
eikon.set_port_number(9000)
eikon.set_app_key("...")

("..." is replaced by the key generated inside Eikon)
Python writes me this :

2020-08-20 14:30:55,348 P[6728] [MainThread 16184] Error: no proxy address identified.
Check if Eikon Desktop or Eikon API Proxy is running.
2020-08-20 14:30:55,348 P[6728] [MainThread 16184] Port number was not identified, cannot send any request
2020-08-20 14:30:55,348 P[6728] [MainThread 16184] Port number was not identified.
Check if Eikon Desktop or Eikon API Proxy is running.
Traceback (most recent call last):
File "C:/Users/kespalivet/Desktop/Size Premium/python/labo.py", line 17, in <module>
eikon.set_app_key("e62adde5e26c4b16a2c5fe0272f7746ecde8914b")
File "C:\Users\kespalivet\Documents\Python\venv\lib\site-packages\eikon\Profile.py", line 38, in set_app_key
get_profile().set_app_key(app_key)
File "C:\Users\kespalivet\Documents\Python\venv\lib\site-packages\eikon\Profile.py", line 233, in set_app_key
self.check_profile()
File "C:\Users\kespalivet\Documents\Python\venv\lib\site-packages\eikon\Profile.py", line 346, in check_profile
raise EikonError(-1, 'Port number was not identified. Check if Eikon Desktop or Eikon API Proxy is running.')
eikon.eikonError.EikonError: Error code -1 | Port number was not identified. Check if Eikon Desktop or Eikon API Proxy is running.

Process finished with exit code 1

Do you have any idea, how can i solve this problem?

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.

Can you confirm that client has followed the debugging article?

Have they confirmed the port number in the SxS.<datetime>.p<process-id>.txt log file from Eikon?

What is the result when they omit the line: eikon.set_port_number(9000)?

Is the server actually running on port the 9000?

Hi Gurpreet,


As per client:


Thanks for your quickly answer.
I have followed all steps on the webpagehttps://developers.refinitiv.com/article/eikon-data-apipython-troubleshooting-refinitiv
Everything seems good, just on the last folder created by Eikon, C:\Users\kespalivet\AppData\Local\Thomson Reuters\Eikon Data\Logs\TRD\Eikon.20200824.110521.p7468


There is only the file EikonDM.20200824.110521225.p7468.txt, no Sxs file.

To detail my previous email, sometime Eikon create Sxs file, as you can find in attachment.

Eikon Python.txt

eikon-python.txt (6.6 KiB)

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.