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
42 9 6 13

I would like to automatically open the "Eikon API Proxy" using a Python script

Within a Python script I want to open the "Eikon API Proxy".


I have tried by using:

import subprocess

theproc = subprocess.Popen("open /Applications/Eikon\ API\ Proxy.app", shell=True)
theproc.communicate()

to no avail. It

Any suggestions would be welcome.

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
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 doesn't give an error message either. Simply does nothing. Again: suggestions welcome!

@vanderkroon

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

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

Otherwise please post again offering further insight into your question.

Thanks,

AHS

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
39.4k 77 11 27

@vanderkroon

It looks like Eikon API Proxy app does not behave as expected on your Mac. The timeouts and the crashes you experienced are not the normal behavior. This is why @Gurpreet. suggested you contact Refinitiv Helpdesk to investigate the root cause of the timeouts and the crashes. This said, if you're looking to launch Eikon API Proxy from Python script on a Mac, you can use the following code.

import subprocess
subprocess.run(['open', '-a', 'Eikon API Proxy.app'])

Since Eikon API Proxy does not signal to the operating system when it finished launching and establishing connection to Eikon platform (in other words when it's ready to be used), you will need to wait an arbitrary period of time after launching Eikon API Proxy before you start executing data requests using Eikon Data APIs.

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
21.9k 58 14 21

Hi @vanderkroon,

The API proxy automatically starts when the Eikon is running on the desktop; you don't have to start it in your python code. Just use:

import eikon as ek
ek.set_app_key('--YOUR APP KEY--')

The second statement will initialize the library's connection to already running proxy.

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
42 9 6 13

I understand that your statement will initiate access to the ThomsonReuters database and I have used it ever since my subscription started.

Unfortunately I run into a situation where the TR server no longer responds in the middle of a script that retrieves data. I will then get getting some type of time-out error which occurs too often, e.g. even this morning. The message that the Eikon API proxy returns is:

Error code: 100

Error message: Unhandled Rejection at: Promise [object Promise] reason: Error: net::ERR_TIMED_OUT

So I want to catch this situation with the <<try>> - <<except>> facility where I want to reconnect by first killing the Proxy and the restart the proxy followed by a re-initiate statement as per your answer.

So back to my original question: how to I get the Eikon API Proxy to run after it produces a "Error code 100" ?

Any suggestions are still quite welcome.

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
42 9 6 13
FYI: Another error message that the Eikon API Proxy occasionally produces is:


An unexpected error has occured.

Eikon API Proxy needs to be restarted.

We are sorry for the inconvenience.

TypeError: Cannot read property 'toString' of undefined

at fs.readFile (/Applications/Eikon API Proxy.app/Contents/Resources/app.asar/node_modules/eikon-module-settings/src/settingssoap.js:67:29)

at ELECTRON_ASAR.js:122:7

at _combinedTickCallback (internal/process/next_tick.js:73:7)

at process._tickCallback (internal/process/next_tick.js:104:9)

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
21.9k 58 14 21

I don't restarting the proxy is the right way to approach this problem. I would recommend that you open a service ticket with Refinitiv to look into your Eikon/proxy.

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.