lseg.data open session will not work

When importing the lseg.data library in python and then calling

ld.open_session() im getting an error

Response 401 on handshake url http://localhost:9025/api/handshake

For previous library refinitiv.data we were able to solve the situation by setting an environment variable 'NO_PROXY' like displayed here.

os.environ['NO_PROXY'] = '127.0.0.1'

Is there any similar solution for the lseg.data library?

Answers

  • Hi @daniel_dev123 ,

    This code should also be working with LSEG data library

    import os
    os.environ['NO_PROXY'] = 'localhost'
    os.environ['NO_PROXY'] = '127.0.0.1'
    

    However, if the issue still persists, the debug log of the library can be enabled with the following code.

    config = ld.get_config()
    config.set_param("logs.transports.file.enabled", True)
    config.set_param("logs.transports.file.name", "lseg-data-lib.log")
    config.set_param("logs.level", "debug")
    ld.open_session()
    

    with these configurations, the lseg-data-lib.log file will be created, please post the log file here (with your credentials removed) for further investigation.