question

Upvotes
Accepted
1 1 1 2

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.

python#technology#productpython apiconfiguration
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.

@hongwaiwong

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply, and then close the question. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS


Upvotes
Accepted
79.3k 253 52 74

@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



1712820914148.png (38.2 KiB)
1712821156955.png (10.2 KiB)
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.

Upvotes
14.2k 30 5 10

Hi @hongwaiwong ,

This seems to be duplicated to question https://community.developers.refinitiv.com/questions/115725/python-refinitivdataplatform-module-configuration.html , have you had a chance to check the answer provided in the thread yet?

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.

Upvotes
1 1 1 2

Hi @raksina.samasiri , that one is also my post but placed in wrong forum and I cannot find a way to delete it. And I checked the answer but they are not helpful.

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.