refinitiv.data._errors.RDError: Error code -1

Hello! I run the followinf code:

df_test = rd.get_data(universe = ['SEK='], fields = ['BID'] )

And get this error message:

refinitiv.data._errors.RDError: Error code -1 | Cannot prepare connection OMMStreamConnection
name : ThreadOMMSTREAMING_PRICING_0.0
state : StreamCxnState.Disposed
subprotocol : tr_json2
is_auto_reconnect: True
can_reconnect : False
num_attempt : 0

The support function cannot help me and i would like to know what this error is and how to get past it.

Thanks in advance,

Carl

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @Carl_Sand_123

    Thank you for reaching out to us.

    To verify what the problem is, please enable the debug log by running the following code before opening a session.

    config = rd.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")
    
    rd.open_session()

    With this code, the lseg-data-lib.log file will be created. Please share this log file.

    You may need to run the following code.

    df_test = rd.get_data(universe = ['SEK='], fields = ['TR.BIDPrice'] )
    print(df_test)
    df_test = rd.get_data(universe = ['SEK='], fields = ['BID'] )
    print(df_test)

    Otherwise, please check the answer on these dicussions.

  • Thanks this worked!

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.