question

Upvotes
Accepted
1 0 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 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
38.1k 71 35 53

@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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea