For a deeper look into our DataScope Select SOAP API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 3 4 6

why to say "Max retries exceeded with url: /RestApi/v1/Authentication/RequestToken"

follow the 20419 question, i used the

https://192.165.219.152/RestApi/v1/Authentication/RequestToken in the python demo (TRTH_OnDemand_IntradayBars),but still Traceback (most recent call last):
  File "TRTH_OnDemand_IntradayBars.py", line 52, in <module>
    r1 = requests.post(requestUrl, json=requestBody,headers=requestHeaders)
  File "/usr/lib/python2.7/site-packages/requests-2.18.4-py2.7.egg/requests/api.py", line 112, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests-2.18.4-py2.7.egg/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests-2.18.4-py2.7.egg/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/site-packages/requests-2.18.4-py2.7.egg/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests-2.18.4-py2.7.egg/requests/adapters.py", line 508, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='hosted.datascopeapi.reuters.com', port=443): Max retries exceeded with url: /RestApi/v1/Authentication/RequestToken (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x1dda390>: Failed to establish a new connection: [Errno 110] Connection timed out',))
dss-rest-apidatascope-selectdss
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

correct it:

requests.exceptions.SSLError: HTTPSConnectionPool(host='192.165.219.152', port=443): Max retries exceeded with url: /RestApi/v1/Authentication/RequestToken (Caused by SSLError(CertificateError("hostname '192.165.219.152' doesn't match 'hosted.datascopeapi.reuters.com'",),))

Related to this query.

Upvotes
Accepted
11.3k 25 8 13

@lei.cheng, can you try the following code which disables SSL verification?

r1 = requests.post(requestUrl, json=requestBody,headers=requestHeaders,verify=False)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

It seems ok. thank u very much. i try test again

@lei.cheng What's the result then?

it may already download the data, but still some

Max retries exceeded with url
Upvotes
13.7k 26 8 12

@lei.cheng,

Can you try with the hostname instead of the IP address in the data request ?

This for two reasons:

  1. The IP address mapping can change in the future
  2. The SSL certificate is bound to the hostname. Using an IP address with a TLS secured channel will raise a Security Exception in your browser or API libraries, and stop you from connecting to the service.
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Hi, i come from china. China need use the ip address, not the hostname to access it.

@lei.cheng, oh, ok. If you type the following URL in a browser, can you see a page ?

https://192.165.219.152/RestApi/v1/

Upvotes
1 3 4 6

Hi, when use the hostname, the error info still is

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='hosted.datascopeapi.reuters.com', port=443): Max retries exceeded with url: /RestApi/v1/Authentication/RequestToken (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x1dda390>: Failed to establish a new connection: [Errno 110] Connection timed out',))
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

@lei.cheng, if you type the following URL in a browser, can you see the login screen ?

https://hosted.datascope.reuters.com/

i use the

https://hosted.datascope.reuters.com/, the err info is

The connection has timed out

Hi, Christiaan

Please see below ticket another client raised before, china clients can't access DSS using Hostname, so use the IP address will be a workaround. thanks.

https://community.developers.refinitiv.com/questions/20152/dss-failed-connected-to-httpshosteddatascopeapireu.html

i come from china. China need use the ip address, not the hostname to access it.

Click below to post an Idea Post Idea