I reinstalled my Eikon due to the Excel add-in doesn't work. Then the Excel fixed but my python API can't run. I tried all the possible solutions on Google and it still doesn't work. The error shows below. What can I do now?
2020-04-16 13:32:07,048 P[28556] [MainThread 22636] Error on checking port 9000 : HTTPConnectionPool(host='localhost', port=9000): Max retries exceeded with url: /api/v1/data (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000198AD8124A8>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))
2020-04-16 13:32:09,060 P[28556] [MainThread 22636] Error on checking port 9000 : HTTPConnectionPool(host='localhost', port=9000): Max retries exceeded with url: /api/v1/data (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000198AB34E0B8>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))
2020-04-16 13:32:11,088 P[28556] [MainThread 22636] Error on checking port 36036 : HTTPConnectionPool(host='localhost', port=36036): Max retries exceeded with url: /api/v1/data (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000198ADCDA4A8>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))
2020-04-16 13:32:11,092 P[28556] [MainThread 22636] Error on handshake port None : Failed to parse: http://localhost:None/api/handshake
2020-04-16 13:32:17,148 P[28556] [MainThread 22636] Error: no proxy address identified.
Check if Eikon Desktop or Eikon API Proxy is running.
2020-04-16 13:32:17,152 P[28556] [MainThread 22636] Port number was not identified, cannot send any request
2020-04-16 13:32:17,154 P[28556] [MainThread 22636] Port number was not identified.
Check if Eikon Desktop or Eikon API Proxy is running.
Traceback (most recent call last):
File "C:\mysite\plottest.py", line 9, in <module>
ek.set_app_key('a6c23acee548458b9313691c8ef342d68c6bbdde')
File "C:\Users\u50949\anaconda\lib\site-packages\eikon\Profile.py", line 39, in set_app_key
get_profile().set_app_key(app_key)
File "C:\Users\u50949\anaconda\lib\site-packages\eikon\Profile.py", line 239, in set_app_key
self.check_profile()
File "C:\Users\u50949\anaconda\lib\site-packages\eikon\Profile.py", line 371, in check_profile
raise EikonError(-1, 'Port number was not identified. Check if Eikon Desktop or Eikon API Proxy is running.')
EikonError: Error code -1 | Port number was not identified. Check if Eikon Desktop or Eikon API Proxy is running.
Everything back to normal after I shut down my PC for the weekend. No idea why reinstall and restart can't solve but this works. Thank you very much for your concern.
Hi @davionwang, If you search this site for "Port number was not identified", there will be dozens of questions, with varying resolutions for you to try. The most common one seems to be to check if a .PortInUse file exists and what is the port number in it.
Hello Gurpreet, thank you very much for your reply. I have tried many solutions. The .PortInUse exists and port is 9000. I followed instructions on the link https://developers.refinitiv.com/article/eikon-data-apipython-troubleshooting-refinitiv
For step 3, there are no SxS files found under TRD folder and http://localhost:9000/ping?all doesn't work for me.
I guess that caused by I reinstall the Eikon and python can't find the right path?
Hi @davionwang,
If you followed the article and configured the Eikon as suggested in step 3, then upon next restart of Eikon and trying to initiate a connection from API, you should see a SXS... log file. It is being written somewhere - so it is important to find it and figure out the cause.
You can upload the file here, so that we can take a look at it as well.
Hi Gurpeet, I restarted Eikon but still can't find the sxs, below lists all filesI also tried to follow this answer https://community.developers.refinitiv.com/answers/45044/view.html
and get this