401, token expired

songwj
songwj Newcomer
edited December 2024 in Refinitiv Data Platform

I am using Colab to get data from LSEG by using the custom config:

ld.open_session(config_name='lseg-data.custom.config.json')

but when I get historical data:

ld.get_history(universe="LSEG.L")

get the error:

LDError: No data to return, please check errors: ERROR: No successful response.(401, token expired)

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @songwj

    Thank you for reaching out to us.

    I assume that you are using the Platform session with the username, password, and app-key parameters.

    If yes, please make sure the account (username, password, and app-key) isn't concurrently used with other applications because typically each account has only one active session.

    Otherwise, you can enable the debug log in the library by using 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(config_name='…')
    

    With these configurations, the lseg-data-lib.log file will be created.