git clone https://github.com/TR-API-Samples/Example.WebSocketAPI.Python.TestClientcd Example.WebSocketAPI.Python.TestClient/python pywstestclient.py -H emea-1.pricing.streaming.edp.thomsonreuters.com -p 443 -items VOD.L,BT.L -u GE-A-01627571-3-1503 -pw <our_password>
The error could be from the refresh token expired (18 hours). If not, we will need to look further on how and when this application has been used.
The workaround is to avoid using refresh token at the moment and send the machineID and password instead. I’ve tested by simply modify the code at get_sts_token function to not using refresh token.
Do you mean the modified request would be:
'username': {machineID e.g. GE-A-00000000-0-0000}
'password': {pass}
'grant_type': 'refresh_token'
instead of
'username': opts.user,
'refresh_token': current_refresh_token,
'grant_type': 'refresh_token'
Possibly related: can customer get iPlanet if they're running multiple full login session from multiple IPs (positions)?
@mehdi.azzouzi: I downloaded the sample from github and ran it with same parameters and did not observe any disconnects. The token was successfully refreshed every 270 seconds. Are you going through a proxy server?
+ @Umer Nalla have you ever seen this?
hi there, i am still seeing my Elektron via my python code getting disconnected. This is really bad because we are not in production:
I have followed your instructions of not using the refresh token but instead sending machineID and password but unfortunately it crashes undeterministicly with the following error:
File "/lib/python3.7/site-packages/websocket/_app.py", line 155, in send
"Connection is already closed.")
websocket._exceptions.WebSocketConnectionClosedException: Connection is already closed.
Can someone please help me on this serious matter as this is severly impacting PRODUCTION.
Thank you