question

Upvotes
Accepted
1 1 1 1

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

rdp-apirefinitiv-data-platformrefinitiv-data-platform-libraries
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.

@pierre.faurel, Can you please advise here.

Hello @cychiang

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS

Hello @cychiang,

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

Thanks,

-AHS

1 Answer

· Write an Answer
Upvotes
Accepted
78.8k 250 52 74

@cychiang

The problem has been fixed in 1.0.0a7.post7

pip install refinitiv-dataplatform==1.0.0a7.post7
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.