python refinitiv.dataplatform module - 'config-change-notifications-enabled' config issue

I am trying to upgrade the refinitiv-dataplatform from 1.0.0a0 to 1.0.0a21. I have encountered a KeyError on config-change-notifications-enabled which is similar with one(https://community.developers.refinitiv.com/questions/96904/refinitivdata-module-python.html)


I see there is a file named rdplibconfig.default.json under \Lib\site-packages\refinitiv\dataplatform which contain the config 'config-change-notifications-enabled'. But somehow the program failed to read it and still returns the error as shown below:

File "refinitiv\dataplatform\_external_libraries\python_configuration\configuration.py", line 155, in __getitem__
KeyError: 'config-change-notifications-enabled'


I also tried something like os.environ["RD_LIB_CONFIG_PATH"] = "./", but no lucky.

Best Answer

  • Jirapongse
    Answer ✓

    @hongwaiwong

    Please consider using the Refinitiv Data Library for Python instead of RDP library.

    To investigate this issue, please run the following code before import refinitiv.dataplatform. For example:

    import logging.config
    logging.config.fileConfig('logging.ini')


    import refinitiv.dataplatform as rdp

    The content of logging.ini is:

    [loggers]
    keys=root,sampleLogger 


    [handlers]
    keys=consoleHandler 


    [formatters]
    keys=sampleFormatter 


    [logger_root]
    level=DEBUG
    handlers=consoleHandler 


    [logger_sampleLogger]
    level=DEBUG
    handlers=consoleHandler
    qualname=sampleLogger
    propagate=0 


    [handler_consoleHandler]
    class=StreamHandler
    level=DEBUG
    formatter=sampleFormatter
    args=(sys.stdout,) 


    [formatter_sampleFormatter]
    format=%(asctime)s - %(name)s - %(levelname)s - %(message)s

    After running the code, you will set the list of configuration files read by the library.

    1712820914148.png

    Therefore, you can check the locations of the configuration file and make that the 'config-change-notifications-enabled' is in those files.

    1712821156955.png


Answers