HI, I am receiving the below error, while running the TRTH Rest API query for the tick history extraction. The first part is giving me the result. But the below code is throwing up the error - ConnectionError: HTTPSConnectionPool(host='s3.amazonaws.com', port=443): Max retries exceeded with url: /tickhistory.query.production.hdc-results/4878128CCEB3485887B68B8C1F66249B/data/merged/merged-Data.csv.gz?AWSAccessKeyId=AKIAJNJ6M4OJR7K3TWNA&Expires=1568374303&response-content-disposition=attachment%3B%20filename%3D_OnD_0x06c9cbb51910f51f.csv.gz&Signature=L3i%2F85avU6ngLDEz1pgNriYMYpk%3D (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000000000E87CB70>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',))
CODE -
requestUrl = "https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/RawExtractionResults" + "('" + jobId + "')" + "/$value"
#AWS requires an additional header: X-Direct-Download
if useAws:
requestHeaders={
"Prefer":"respond-async",
"Content-Type":"text/plain",
"Accept-Encoding":"gzip",
"X-Direct-Download":"true",
"Authorization": "token " + token
}
else:
requestHeaders={
"Prefer":"respond-async",
"Content-Type":"text/plain",
"Accept-Encoding":"gzip",
"Authorization": "token " + token
}
r4 = requests.get(requestUrl,headers=requestHeaders)
I was able to run this before - have used this code extensively with modification. But recently I am getting the error. please help me to fix this.