RDP WebSocket hanging when connecting
I have a problem running a python sample (market_price_spot.py) for testing the WebSocket RDP connection. In two computers that I tested, it worked as expected. But on other two, after retrieving the token successfully, the program hangs when trying to connect to the websocket address - an error does not happen, it just stands there waiting for a connection that will not happen.
Connecting to WebSocket wss://amer-3-t1.streaming-pricing-api.refinitiv.com/WebSocket for session1...
In the same computer, the same credentials were used in a similar C# sample and it worked as expected. So it is not a connectivity problem nor the credentials.
The python and libraries versions are:
Python: 3.9.2
WebSocket-client library: 0.58.0
requests library: 2.25.1
In the a Q&A in the developer pages of the "WebSocket API quickstart" that says that the versions should be "2.7.14, 3.6.7" and websocket-client greater than 0.49, but I think it should work with the versions I have.
Has someone come accross a problem like this one? Or that can suggest something to make it work?
Best Answer
-
Hello @henrique.hissataka,
There is an issue with some python clients, with websocket-client <=0.57 vs 0.58. Works with one or the other, the module does not report any errors when it does not.
I would try example Discovery, latest from GitHub, as suggested by @Gurpreet and it should run.
You can try:
python -m pip install websocket-client==0.57.0
to see if spot example requires <= 0.57
0
Answers
-
Hello @henrique.hissataka,
Can you try to use the service discovery example from github and see if you still have issues. One clear difference in C# and Python is that .NET will use the system proxy information if set, whereas Python will not. So, if you are behind proxy/firewall, you will have to explicitly configure the python modules to use it.
Let us know your findings, and we can help you resolve any issues.
0 -
Thanks a lot, @zoya faberov, by switching the websocket-client to 0.57.0 made the sample I was using work as expected. A client for whom I was making this checking reported that for him the library version 0.48, 0.55 and 0.57 worked, but the 0.50 and 0.58 didn't...
I will try later the last version of Discovery as suggested by @Gurpreet, thanks for the suggestion!
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛