question

Upvotes
Accepted
28 2 1 2

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 512.0 KiB each and 1.0 MiB total.

Hello @Alison.Quick,

Thank you for your participation in the forum.

Is the reply below satisfactory in answering your question?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

-AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
22k 59 14 21

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 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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