new_status_code not defined in OMMStream _on_status in omm_stream.py

I am using rdp.StreamingPrices API on refinitiv-dataplatform 1.0.0a7.

I don't have a reliable way to trigger this issue, but I saw this issue happened and looked at the source code.

It seems weird that I can't find where new_status_code is defined:


_on_status

# update state

if new_status_code == 'Open':

# received an open stream

self._state = StreamState.Open

elif new_status_code == 'Closed':

# received an closed stream

self._state = StreamState.Closed


The error I got is

NameError: name 'new_status_code' is not defined

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @Cheng-Yi

    The problem has been fixed in 1.0.0a7.post7

    pip install refinitiv-dataplatform==1.0.0a7.post7