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
1 0 1 2

Error: no proxy address identified following upgrade to Python 3.9

Hello
Following upgrade to python 3.9.1, scripts which previously worked fine under python 3.8.1 are now failing with Error code -1
The Eikon terminal is on the same machine and is running when the following code is executed:

"

import eikon as ek


ek.set_app_key('[Intentionally hidden]')

2022-11-10 18:18:58,530 P[15596] [MainThread 10840] Error: no proxy address identified.

Check if Eikon Desktop or Eikon API Proxy is running.

2022-11-10 18:18:58,531 P[15596] [MainThread 10840] Port number was not identified, cannot send any request

2022-11-10 18:18:58,532 P[15596] [MainThread 10840] Port number was not identified.

Check if Eikon Desktop or Eikon API Proxy is running.

Traceback (most recent call last):


File "C[...]\AppData\Local\Temp\ipykernel_15596\1011060241.py", line 1, in <module>

ek.set_app_key('[Intentionally hidden')


File "Y:\[Old path ]\eikon\Profile.py", line 33, in set_app_key

get_profile().set_app_key(app_key)


File "Y:\[Old path] \eikon\Profile.py", line 231, in set_app_key

self.check_profile()


File "Y:\[Old path] \eikon\Profile.py", line 354, 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.

While upgrading python, I also proceded to 'reorganize' my python setup and moved certain directories. I note per the traceback, that ek.set_app_key is still looking into an old directory, in spite of having removed any reference to it in the python path manager...

I reinstalled the eikon module that didn¡t solve my issue.


Is that the case that I should request a new api key following the upgrade of Python?
Could it be that eikon dapi is incompatible with python 3.9?

Any thought will be greatly welcome!
Thanks



eikoneikon-data-api#technologyproxyport-number
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.

Upvote
Accepted
80k 257 52 75

@mverdier

It may relate to this error.

2022-11-11 09:36:44,325 P[29060] [MainThread 10208] HTTP request failed: TypeError("send() got an unexpected keyword argument 'timeout'")

Please refer to this thread.

Check the version of the httpx library.

You can upgrade to the new version of Eikon Data API 1.1.16.

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.

Thanks for the help @zoya faberov @Jirapongse and for the separate chaser by @Jirapongse . I apologize for not reverting earlier, but since I noticed other proxy related issues (e.g. while using 'requests') I suspect the issue must be one of company policy. I have raised it with them and amwaiting for their conclusions before posting back.
I should have a clearer picture in the coming days.

Upvote
32.2k 40 11 20

Hello @mverdier,

Eikon Data API is compatible with Python 3.9.

Let us try to help you to pinpoint the possible issue:

1. Suggest to first shut down and restart Eikon desktop, making sure that it restarts cleanly, and giving Eikon API proxy additional chance to be restarted as well.

2. If this does not help, confirm that Eikon API proxy is running, please verify

 http://localhost:<PORT>/ping?all

see more details in article Eikon Data API(Python) Troubleshooting | Refinitiv. If the proxy is not running, enable logging to try to figure the cause.

3. If the Eikon API proxy is running, next step is to verify the eikon library version and dependency library versions httpx and nest-asyncio on your new python 3.9 environment. See the answers in this previous discussion thread for the details.

Hope that this information leads to the solution,

Let us know what you find on your side?

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
1 0 1 2

Thank you @zoya faberov for showing interest on that issue.
I have verified Eikon desktop version is 4.0.60 and python eikon module's 1.1.8

I have activated log level 4 (my screen is slightly different from the one on the help page).
The log file called 'APIProxy.[xyz].txt' indicates:
"

start node


Arg: C:\Program Files (x86)\Thomson Reuters\Eikon\Z\Bin\Eikonbox.exe C:\Users\[...]\AppData\Local\Thomson Reuters\Eikon User\Cache\LibraryCache\Apps\REFINITIVHOLDINGS.EIKON.DATAAPIPROXY\1.6.1.0\index.js -TraceLevel=-1

"
As no port is showing, I am not able to verify its state.

Perhaps the issue arises from internal security setting, though surprisingly that did not occur prior to upgrading python.
Again, thanks for your help

If that helps, below you will find console output after having set log level to 1, and run 'ek.set_app_key([mykey])':

2022-11-11 09:36:44,145 P[29060] [MainThread 10208] Reset a Desktop session with new app_key
2022-11-11 09:36:44,191 P[29060] [MainThread 10208] Send GET request to http://127.0.0.1:9060/api/status to detect API Proxy...
2022-11-11 09:36:44,205 P[29060] [MainThread 10208] Request to http://127.0.0.1:9060/api/status
headers = {'x-tr-applicationid': '[Intentionally hidden]'}
params = None
2022-11-11 09:36:44,219 P[29060] [MainThread 10208] HTTP request failed: TypeError("send() got an unexpected keyword argument 'timeout'")
2022-11-11 09:36:44,237 P[29060] [MainThread 10208] Error on checking port 9060 : TypeError("send() got an unexpected keyword argument 'timeout'")
2022-11-11 09:36:44,259 P[29060] [MainThread 10208] Warning: file .portInUse was not found. Try to fallback to default port number.
2022-11-11 09:36:44,278 P[29060] [MainThread 10208] Try defaulting to port 9000...
2022-11-11 09:36:44,294 P[29060] [MainThread 10208] Send GET request to http://127.0.0.1:9000/api/status to detect API Proxy...
2022-11-11 09:36:44,310 P[29060] [MainThread 10208] Request to http://127.0.0.1:9000/api/status
headers = {'x-tr-applicationid': '[Intentionally hidden]'}
params = None
2022-11-11 09:36:44,325 P[29060] [MainThread 10208] HTTP request failed: TypeError("send() got an unexpected keyword argument 'timeout'")
2022-11-11 09:36:44,342 P[29060] [MainThread 10208] Error on checking port 9000 : TypeError("send() got an unexpected keyword argument 'timeout'")
2022-11-11 09:36:44,358 P[29060] [MainThread 10208] Try defaulting to port 36036...
2022-11-11 09:36:44,377 P[29060] [MainThread 10208] Send GET request to http://127.0.0.1:36036/api/status to detect API Proxy...
2022-11-11 09:36:44,400 P[29060] [MainThread 10208] Request to http://127.0.0.1:36036/api/status
headers = {'x-tr-applicationid': '[Intentionally hidden]'}
params = None
2022-11-11 09:36:44,418 P[29060] [MainThread 10208] HTTP request failed: TypeError("send() got an unexpected keyword argument 'timeout'")
2022-11-11 09:36:44,444 P[29060] [MainThread 10208] Error on checking port 36036 : TypeError("send() got an unexpected keyword argument 'timeout'")
2022-11-11 09:36:44,468 P[29060] [MainThread 10208] Error: no proxy address identified.
Check if Eikon Desktop or Eikon API Proxy is running.
2022-11-11 09:36:44,486 P[29060] [MainThread 10208] Port number was not identified, cannot send any request
2022-11-11 09:36:44,503 P[29060] [MainThread 10208] Init a Desktop session with new app_key
2022-11-11 09:36:44,539 P[29060] [MainThread 10208] Port number was not identified.
Check if Eikon Desktop or Eikon API Proxy is running.
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
1 0 1 2

I can confirm that the issue resided on my end and was the consequence of certain company settings.
This has been addressed and the api is working fine.
I learned a great deal, especially with the contributions of @Jirapongse and @zoya faberov I apologize if I have wasted anybody's time.


As far as I am concerned the case is closed.


Note: for some reason I cannot give upvote to @Jirapongse , which for the record is my intention.

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.