AttributeError: module 'eikon' has no attribute 'set_app_key'

Hello. I just started using the eikon API. When I try to use the example scripts in the website, I get this error. I tried the solutions in the two similar questions, namely pip upgrade eikon and adding to the path, but it didnt work. Thanks in advance.

Best Answer

  • pf
    pf LSEG
    Answer ✓

    You possibly mixed different versions.

    A solution is to uninstall then re-install eikon library.

    set_app_key replaced set_app_id since 0.1.12 beta version.

    If you check helper on set_app_xxx functions :

    >>> help(ek.set_app_id)
    Help on function set_app_id in module eikon.Profile:

    set_app_id(app_id)
    Set the application id.

    Parameters
    ----------
    app_id : string
    the application id

    Notes
    -----
    The application ID identifies your application on Refinitiv Platform.
    You can get an application ID using the App Key Generator. This App is available in Eikon Desktop.

    .. deprecated:: 0.1.12
    This will be removed in 1.1.0. Use set_app_key function instead
    >>> help(ek.set_app_key)
    Help on function set_app_key in module eikon.Profile:

    set_app_key(app_key)
    Set the application key.

    Parameters
    ----------
    app_key : string
    the application key
    Notes
    -----
    The app key identifies your application on Refinitiv Platform.
    You can get an application ID using the App Key Generator. This App is available in Eikon Desktop.

    Regards

Answers