eikon python module 1.1.2 behavior change

After an upgrade from 1.0.1 to 1.1.2 Eikon module prints debug data to console.

How can I stop it?


[EikonPHistory] There are 95 sub-tasks. Starting one...

2020-08-14 12:22:30,997 P[33500] [MainThread 17808] Request:{'Entity': {'E': 'TimeSeries', 'W': {'rics': ['AZTECACPO.MX'], 'fields': ['VOLUME;VALUE;', 'TIMESTAMP'], 'interval': 'tick', 'startdate': '2020-08-14T20:00:00', 'enddate': '2020-08-14T20:10:00'}}}

2020-08-14 12:22:31,548 P[33500] [MainThread 17808] HTTP Response code: 200

2020-08-14 12:22:31,548 P[33500] [MainThread 17808] HTTP Response: {"timeseriesData":[{"dataPoints":null,"errorCode":"TSIError","errorMessage":"Error: TSINoDataAvailable, ErrorCode: TA-TSINoDataAvailable, Fault: TSIError, Description: No data available for the requested date range","ric":"AZTECACPO.MX","statusCode":"Error"}]}

2020-08-14 12:22:31,553 P[33500] [MainThread 17808] Error with AZTECACPO.MX: No data available for the requested date range

2020-08-14 12:22:31,553 P[33500] [MainThread 17808] AZTECACPO.MX: No data available for the requested date range |


I have this line in the code:

ek.set_log_level(eklogin.DEBUG)

But this enabled the logging to the file. I still need it.

Best Answer

  • Hi,

    By default, debug info are also sent to stdout.
    To disable this, one solution is :

    import logging

    ...

    ek.set_app_key("your app key")
    logger = logging.getLogger("pyeikon")
    logger.propagate = False

    Then, you won' have no more debug output except in the log file.