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
36 1 2 3

Hi, I am trying to get fundamental data using ek.get_data for the first time but the code hangs

I'm using Jupyter Notebook. import eikon as ek ek.set_app_key('') df, err = ek.get_data(['GOOG.O','MSFT.O', 'FB.O'], [ 'TR.Revenue','TR.GrossProfit']) the ek.get_data hangs, it doesn't raise an error and doesn't complete.
eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apidata
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 @barry.chapman

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

Upvote
Accepted
36 1 2 3
Problem solved. I had a version of Python installed that was not compatible with other installed package. It now works. Thanks for your suggestions.
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
18.2k 21 13 21

Hi @barry.chapman

I just tested the code and it works fine for me.


I am using Python 3.7.4 32bit

I just would like to check the dependencies version.

These are all the dependencies on my machine which works fine.

Requirement already satisfied: eikon in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (1.1.9)
Requirement already satisfied: appdirs>=1.4.3 in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (from eikon) (1.4.3)
Requirement already satisfied: websocket-client in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (from eikon) (0.56.0)
Requirement already satisfied: nest-asyncio>=1.5.1 in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (from eikon) (1.5.1)
Requirement already satisfied: deprecation in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (from eikon) (2.0.6)
Requirement already satisfied: datetime in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (from eikon) (4.3)
Requirement already satisfied: numpy>=1.11.0 in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (from eikon) (1.16.4)
Requirement already satisfied: httpx in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (from eikon) (0.14.3)
Requirement already satisfied: python-dateutil in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (from eikon) (2.8.0)
Requirement already satisfied: pandas>=1.0.0 in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (from eikon) (1.1.0)
Requirement already satisfied: six in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (from websocket-client->eikon) (1.15.0)
Requirement already satisfied: packaging in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (from deprecation->eikon) (19.0)
Requirement already satisfied: zope.interface in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (from datetime->eikon) (4.6.0)
Requirement already satisfied: pytz in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (from datetime->eikon) (2019.3)
Requirement already satisfied: sniffio in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (from httpx->eikon) (1.2.0)
Requirement already satisfied: chardet==3.* in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (from httpx->eikon) (3.0.4)
Requirement already satisfied: rfc3986[idna2008]<2,>=1.3 in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (from httpx->eikon) (1.3.2)
Requirement already satisfied: certifi in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (from httpx->eikon) (2019.6.16)
Requirement already satisfied: httpcore==0.10.* in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (from httpx->eikon) (0.10.2)
Requirement already satisfied: pyparsing>=2.0.2 in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (from packaging->deprecation->eikon) (2.4.0)
Requirement already satisfied: setuptools in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (from zope.interface->datetime->eikon) (40.8.0)
Requirement already satisfied: idna; extra == "idna2008" in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (from rfc3986[idna2008]<2,>=1.3->httpx->eikon) (2.8)
Requirement already satisfied: h11<0.10,>=0.8 in c:\users\bowling\appdata\local\programs\python\python37-32\lib\site-packages (from httpcore==0.10.*->httpx->eikon) (0.8.1)



ahs.jpg (37.7 KiB)
ahs2.jpg (406.1 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.

Upvotes
10.2k 18 6 9

@barry.chapman Can I ask what version of Eikon, Eikon Library (ek.__version__) and python you are using. Please separate your code into two cells - in the first cell:

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

and in the second cell:

df, err = ek.get_data(['VOD.L'], ['TR.Revenue','TR.GrossProfit'])
df

Please run the first cell and post the result along with the other info and then try the second cell and see what happens. I hope this can help.

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
36 1 2 3

Thanks for the responses.

Import eikon worked,

then I ran the set_app_key, which complained because I didn't have Eikon open on my pc.

After opening Eikon and I re-ran the ek.set_app_key key, which hung. There was no error, it just never completed.

I then shut down jupyter notebook, repoened it and ran import eikon, and then ek.__version__ which returned1.1.9.

I then ran set_app_key which appeared to work, but after that I ran ek.__version__, which this time took about 5 minutes to return 1.1.9

the ek.get_data has been running for 10 mins.

So maybe it's a network issue, but I'm not getting any other network issues.


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
36 1 2 3

Capture ek.JPG

Here's a screenprint.


capture-ek.jpg (44.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.

Upvotes
10.2k 18 6 9

@barry.chapman Eikon always needs to be open when using the API as it uses an in-built proxy. Are you running on a corporate network? If so can you try running without connecting to your VPN? I think this might be some corporate firewall issue and that would confirm. Please try and let me know.

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
36 1 2 3

Thanks again, it looks like it's an issue with the setup on my PC, as the code works for another user in my organisation. I will look into my pc issues.

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
36 1 2 3

Hi, I have reinstalled the environment on my C drive instead of using the network drive but get the same issue, which is set_app_key works ok, but ek.__version__ takes many minutes to return. Are there any ways to look into why it would take so long? (I don't have any other network issues, and Eikon is working ok on the PC).

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.