For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
84 1 1 5

Eikon API error with Spider 3.3.3.

I recently reinstalled Spider with the newer 3.3.3 version and then executed pip install eikon from Anaconda Navigator 1.9.7 shell, which went fine. However while importing ek from a console, I am getting error, as shown below. This was working perfectly earlier.

from eikon import ek

Traceback (most recent call last): File "<ipython-input-2-d37fe12a15bf>", line 1, in <module> from eikon import ek ImportError: cannot import name 'ek' from 'eikon' (C:\Users\Admin\Anaconda3\lib\site-packages\eikon\__init__.py)

Appreciate any help to get me back on track.

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
39.2k 75 11 27

@lebenjohnson.mannariat
I think you got confused. The statement

from eikon import ek
could have never worked. It's an erroneous statement. The name 'ek' is not defined in eikon library and it never was. What you must have meant to use is
import eikon as ek
as @jirapongse.phuriphanvichai pointed out. The latter statement is a customary way of importing eikon library into your Python module.
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
18k 21 12 20

Try this:

pip upgrade eikon
pip show eikon

To make sure that Eikon API is installed and try to use the API again.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
38.1k 71 35 53

@lebenjohnson.mannariat

Typically, I use the following code:

import eikon as ek

I got the same error if using "from eikon import ek".

ImportError: cannot import name 'ek' from 'eikon' (c:\python37\lib\site-packages\eikon\__init__.py)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
84 1 1 5

Thanks much appreciated.

Regards

Leben

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea