For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 1 1 0

Key error: 'eikon'

Just starting out using the API and ran into a Key Error issue

My code is below:

import eikon as ek

import configparser as cp

import cufflinks as cf

cfg = cp.ConfigParser()

cfg.read('eikon.cfg')

ek.set_app_key(cfg['eikon']['*This is my app key*'])

rics = ['JKMc1','TRGBNBPMc1']

print(rics)

eikon-data-apielektronrefinitiv-realtimeelektron-sdk
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.

1 Answer

· Write an Answer
Upvotes
Accepted
78.6k 248 52 74

@vincent.turner

It looks like to be the error message from the configparser library.

From my testing, the eikon.cfg should have the following entries:

[eikon]
appkey = <appkey>

Please replace the <appkey> with your application key.

Then, the appkey can be used in the ek.set_app_key method with the following code.

cfg = cp.ConfigParser()
cfg.read('eikon.cfg')
ek.set_app_key(cfg['eikon']['appkey'])
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.