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
24 2 3 4

Python API Error on handshake port 9000

After EIKON App update earlier this week I can no longer use the python API. In particular, the error I get is:

Error on handshake port 9000 : ReadTimeout(ReadTimeout())

The app and Excel addon are working fine. I tried restarting the app and the PC but no luck. I also run the Powershell script (CheckEikonDataAPI14.ps1) provided in answers to similar questions. The output is attached. Hope someone will be able to help resolve the problem

installed versions:

Eikon Desktop: 4.0.52005

python libraries:

eikon: 1.1.2

http3: 0.6.7

nest-asynco : 1.0.0

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apiport-numberhandshake
output2.txt (79.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.

Hello @niskrev

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question.

Thanks,


AHS

@niskrev

Thank you for your participation in the forum. Were you able to resolver the issue you experienced with the help of Refinitiv support? If yes, would you mind sharing on this thread how the problem was resolved? This will help other users who may experience similar problem in the future. We would very much appreciate if you could update this thread with the status of the issue. Thank you.

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
4.3k 2 4 5

Do you have similar logs ?

[2020-10-16 08:51:08.341|1|api-svc|1|INFO] Listening to port=9060
...
[2020-10-16 12:30:46.598|1|data-api|1|INFO] [LogRequestDetailMiddleware][Request #73f907d4-f729-4c55-811c-009a75643609] New incoming GET request
[2020-10-16 12:30:46.605|1|data-api|3|DEBUG] [LogRequestDetailMiddleware][Request #73f907d4-f729-4c55-811c-009a75643609] URL: http://127.0.0.1:9060/api/status
[2020-10-16 12:30:46.611|1|data-api|3|DEBUG] [LogRequestDetailMiddleware][Request #73f907d4-f729-4c55-811c-009a75643609] Headers: {"host":"127.0.0.1:9060","user-agent":"python-httpx/0.14.3","accept":"*/*","accept-encoding":"gzip, deflate","connection":"keep-alive","x-tr-applicationid":"xxxxxxxxxxxxxxxxxxxx"}
...
[2020-10-16 12:30:46.671|1|data-api|1|INFO] [LogRequestDetailMiddleware][Request #4caacf9b-7fdd-49cc-b5e5-83c78ff41a33] New incoming POST request
[2020-10-16 12:30:46.679|1|data-api|3|DEBUG] [LogRequestDetailMiddleware][Request #4caacf9b-7fdd-49cc-b5e5-83c78ff41a33] URL: http://127.0.0.1:9060/api/handshake
[2020-10-16 12:30:46.687|1|data-api|3|DEBUG] [LogRequestDetailMiddleware][Request #4caacf9b-7fdd-49cc-b5e5-83c78ff41a33] Headers: {"host":"127.0.0.1:9060","user-agent":"python-httpx/0.14.3","accept":"*/*","accept-encoding":"gzip, deflate","connection":"keep-alive","content-type":"application/json","x-tr-applicationid":"xxxxxxxxxxxxxxxxxxxx","content-length":"161"}
...
[2020-10-16 12:30:46.780|1|data-api|3|DEBUG] Sending usage tracking payload {"Target":"/UsageTracking","RequestType":"send","Method":"EventRawData","MethodParam":{"EventName":"RequestReceived","EventProperties":"{\"AppKey\":\"1fdf06af15764dc79e27fa4760bb77464642e8f8\",\"EndPoint\":\"SymbologySearch\",\"API\":\"Eikon Data APIs\"}","ProjectToken":"881d83de3bf9490988d03e2250149e5a"}} on EikonBus channel /UsageTracking
[2020-10-16 12:30:47.865|1|api-svc|3|DEBUG] Request -> https://amers1.apps.cp.thomsonreuters.com/Apps/UDF/MSF has a response with status code: 200

Check especially how API Proxy manages each request (search "New incoming POST request").

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 @pierre.faurel,

Setting ek.set_log_level(1) provided some useful information but I can only see it on the screen, couldn't find it in the logs. The message is basically that the site has been blocked by my organization. Among other things, the message on the screen shows the following, followed by the line "Access Blocked".

2020-10-19 16:29:10,600 P[25128] [MainThread 25132] Port 9060 was retrieved from .portInUse file
2020-10-19 16:29:10,601 P[25128] [MainThread 25132] Try to handshake on url http://127.0.0.1:9060/api/handshake...
2020-10-19 16:29:10,602 P[25128] [MainThread 25132] Request to http://127.0.0.1:9060/api/handshake
        headers = {'Content-Type': 'application/json', 'x-tr-applicationid': '859e545618c948d39d7d7b34ddaa16a8e01f8a59'}
        params = None
2020-10-19 16:29:10,842 P[25128] [MainThread 25132] HTTP request response 200

I can request access to an URL to be unblocked, but am not sure what it is, is it http://127.0.0.1:9060/api/handshake? Thanks for your help!

This becomes too technical and personal.

If you can see an "Access Blocked", I'll suggest to use a tool like Fiddler, or to check with your IT which access was blocked.

To avoid any exchange of individual data, could you contact the Refinitiv support to send this request and specify to contact dev team.
Support will contact us.

Upvotes
4.3k 2 4 5

Hi,

Could you detail your Eikon version and APPs versions (from Eikon Help About windows) ?

And just to avoid confusion, confirm version of python libs:

  • eikon
  • httpx
  • nest-asynco

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.

Eikon Desktop: 4.0.52005

python libraries:

eikon: 1.1.2

http3: 0.6.7 (I dont have httpx installed, in case it's relevant, the version of requests I have is 2.22.0)

nest-asynco : 1.0.0


Thanks!



Upvotes
10.2k 18 6 9

@niskrev What versions of the following are you running:

Eikon Desktop

Eikon Library

Python

Also please see this thread and let us know how you get on.

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.

@jason.ramchandani I reinstalled eikon and now have 1.1.6.post3

installed httpx==0.14.3

nest-asyncio is 1.3.3

python is 3.7.7

cleared the EIKON cache (but kept Keep Apps cache box checked)

The error I get now is

Error on handshake port 9060 : JSONDecodeError('Expecting value: line 1 column 1 (char 0)')

The PS script produces an output file which to too big to attach here (991KB). So instead I attach the parts which seem most relevant. short_output.txt

short-output.txt (4.6 KiB)
Upvotes
79.1k 250 52 74

@niskrev

You can try the following commands in PowerShell.

Invoke-WebRequest -Uri "http://127.0.0.1:9060/api/v1/data" -Method POST
Invoke-WebRequest -Uri "http://127.0.0.1:9000/api/v1/data" -Method POST
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
4.3k 2 4 5

Hi,

eikon 1.1.7 is available on pypi.

Not sure that will fix your issue but it'll provide more information in logs and JSONDecodeError is well managed.

Could you update and retry with "ek.set_log_level(1)" in your script ?

Could you check also in Eikon logs the file APIProxy.yyyymmdd.hhmmss.txt ?
(it should be in C:\ProgramData\Thomson Reuters\Eikon Data\Logs\TRD\Eikon.202010dd.hhmmss.pxxxx directory)


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.

This is the content of the log file:

start node
Arg: C:\Program Files (x86)\Thomson Reuters\Eikon\X\Bin\Eikonbox.exe C:\Users\eeu227\AppData\Local\Thomson Reuters\Eikon User\Cache\LibraryCache\Apps\REFINITIVHOLDINGS.EIKON.DATAAPIPROXY\1.1.0.11\index.js -TraceLevel=-1 

I updated to eikon 1.1.7 but still get the same error

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.