Hi,
I have tried to run a simple API connection from python. I have read the forums and tried most of the things I could find.
After I enabled debug, the python error I get is this one:
2020-08-26 12:20:59,015 P[12560] [MainThread 20152] Timeout on checking port 9060
2020-08-26 12:20:59,015 P[12560] [MainThread 20152] Warning: file .portInUse was not found. Try to fallback to default port number.
2020-08-26 12:20:59,015 P[12560] [MainThread 20152] Try defaulting to port 9000...
2020-08-26 12:21:09,016 P[12560] [MainThread 20152] Timeout on checking port 9000
2020-08-26 12:21:09,016 P[12560] [MainThread 20152] Try defaulting to port 36036...
2020-08-26 12:21:19,017 P[12560] [MainThread 20152] Timeout on checking port 36036
2020-08-26 12:21:19,017 P[12560] [MainThread 20152] Error: no proxy address identified.
Check if Eikon Desktop or Eikon API Proxy is running.
2020-08-26 12:21:19,017 P[12560] [MainThread 20152] Port number was not identified, cannot send any request
2020-08-26 12:21:19,017 P[12560] [MainThread 20152] Init a Desktop session with new app_key
2020-08-26 12:21:19,017 P[12560] [MainThread 20152] Port number was not identified.
Check if Eikon Desktop or Eikon API Proxy is running.
Traceback (most recent call last):
File "C:/personal projects/Eikon Database/Coding/get_sp500.py", line 9, in <module>
ek.set_app_key("090264f7d76641bbb49b7110a6046a3f04f863d9")
File "C:\personal projects\Eikon Database\Coding\venv\lib\site-packages\eikon\Profile.py", line 38, in set_app_key
get_profile().set_app_key(app_key)
File "C:\personal projects\Eikon Database\Coding\venv\lib\site-packages\eikon\Profile.py", line 233, in set_app_key
self.check_profile()
File "C:\personal projects\Eikon Database\Coding\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
I have run the troubleshooting steps found on the forum:
I can connect to: http://localhost:9000/ping?all
{"port": 9000,"mode": "eikon4","pid": 9604,"hasSecure": true,"startedTime": "Wed Aug 26 2020 11:55:54 GMT+0200 (Romance Daylight Time)","subApps": [{"path": "/heap"},{"path": "/ping"},{"path": "/sxs","data": {"hasSecure": true,"sxsApps": {}}},{"path": "/api"},{"path": "/sxs/v1/services/messenger"}]}
However I can not connect to: http://localhost:9060/api
{"code": 500,"message": "Cannot find module \".\"","statusMessage": "Internal Server Error"}
The .portInUse file exists and has the value 9060. I debuged the desktop_session.py code and it finds it. The problem is that it can not establish the connectivity.
I am attaching the SxS file as instructed in other posts and also the result of running the powershell debug script.
powershell-result.txt
SxS.20200826.115544000.p9604.txt
eikon library version is 1.1.5
Refinitiv Desktop App version 4.0.52