question

Upvotes
Accepted
3 0 0 3

How to stop Python Data library from retrying connection

I am testing the new python api to connect to a deployed TREP server.

https://developers.refinitiv.com/en/api-catalog/refinitiv-data-platform/refinitiv-data-library-for-python

And I follow this example to open a streaming to retrieve live prices.

https://github.com/Refinitiv-API-Samples/Example.DataLibrary.Python/blob/main/Tutorials/2.Content/2.2-Pricing/TUT_2.2.02-Pricing-StreamingCache.ipynb

What I found is if I provide incorrect username, the stream will keep retrying and never terminate the thread.

the session.stream_auto_reconnection is hardcoded to True and cannot be configured.

calling stream.close() also raise error "AttributeError: 'NoneType' object has no attribute 'remove_listener'". I guess it is because stream is pending to be opened, so you cant really close it.


What should I do to stop stream from reconnecting or to terminate it?

pythonpython api#technology#productstreaming-data
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.

Upvote
Accepted
16.8k 31 9 12

Hello @tino.chow

Sorry for the late response. The RD Library team informs that the issue is addressed in refinitiv-data version 1.0.0b25.

Hope this helps.


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.

Upvotes
31.8k 37 11 19

Hello @tino.chow ,

Thanks for letting us know.

I see the same and I have contacted RD Library experts for a clarification.

We will update this question.

Thanks for your patience.

-AHS

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.

Hi, is there any updates on this?