We use refinitiv-dataplatform==1.0.0a6 and Python 3.8.6 (Debian GNU/Linux 10 (buster))
It works fine but after a few hours it returns:
[2020-10-26 02:15:04,471] - [session.platform] - [ERROR] - [stream_connection] - [_ws_error] - WebSocket error occurred for web socket client 1 (login id 2483) : Connection is already closed. [2020-10-26 02:16:05,363] - [session.platform] - [ERROR] - [stream_connection] - [_ws_error] - WebSocket error occurred for web socket client 1 (login id 2484) : Connection is already closed.
What could be the issue?
def streaming_prices(): streaming_prices = rdp.StreamingPrices( universe=list_of_rics, on_update=lambda streaming_price, instrument_name, fields: display_updated_fields(streaming_price, instrument_name, fields) ) streaming_prices.open() while True: try: asyncio.get_event_loop().run_until_complete(asyncio.sleep(1)) except (KeyboardInterrupt, SystemExit): rdp.close_session() break
There is an updated version of RDP library refinitiv-dataplatform 1.0.0a7. Can you please try with this.
I am trying to ascertain if it is the Refresh token renewal which fails or your network components - proxy/firewall drops the connection. For latter, are you able to perform this test from a different network like home or office. Keeping track of how long it stays connected will also help.