question

Upvotes
Accepted
28 1 1 1

Hi All, I have a client who is using DSWS for the first time. He has the correct prutil on his ID. When attempting to connect (after entering his username and password) he gets an error message, any ideas?

_get_token : Exception Occured

(<class 'requests.exceptions.ConnectionError'>, ConnectionError(MaxRetryError("HTTPSConnectionPool(host='product.datastream.com', port=443): Max retries exceeded with url: /DSWSClient/V1/DSService.svc/rest/GetToken (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001BF80939A20>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))")), <traceback object at 0x000001BF8092B3C8>)

None

Traceback (most recent call last):

File "C:\ProgramData\Anaconda3\lib\site-packages\urllib3\connection.py", line 171, in _new_conn

(self._dns_host, self.port), self.timeout, **extra_kw)

File "C:\ProgramData\Anaconda3\lib\site-packages\urllib3\util\connection.py", line 56, in create_connection

for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):

socket.gaierror: [Errno 11001] getaddrinfo failed


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

File "C:\ProgramData\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen

chunked=chunked)

File "C:\ProgramData\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 343, in _make_request

self._validate_conn(conn)

urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x000001BF80939A20>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

File "C:\ProgramData\Anaconda3\lib\site-packages\requests\adapters.py", line 445, in send

timeout=timeout

File "C:\ProgramData\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 638, in urlopen

_stacktrace=sys.exc_info()[2])

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='product.datastream.com', port=443): Max retries exceeded with url: /DSWSClient/V1/DSService.svc/rest/GetToken (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001BF80939A20>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

File "C:\ProgramData\Anaconda3\lib\site-packages\DatastreamDSWS\DS_Response.py", line 248, in _get_token

verify=self.certfile.name).json()

File "C:\ProgramData\Anaconda3\lib\site-packages\requests\api.py", line 112, in post

return request('post', url, data=data, json=json, **kwargs)

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='product.datastream.com', port=443): Max retries exceeded with url: /DSWSClient/V1/DSService.svc/rest/GetToken (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001BF80939A20>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))

datastream-apidsws-api
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.

1 Answer

Upvotes
Accepted
13k 32 12 18

Hi @Alison.Quick, It looks like the application is not able to resolve the hostname because it is behind a proxy server.

Please ask the user to input the correct proxy information in the user configuration file:

[proxy_details]
server=***
username=***
password=***
port=***
ssl_verify]
certificate=

See the Readme file along with python samples here. User can get the correct proxy/firewall details from their network team.

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.

Click below to post an Idea Post Idea