question

Upvotes
Accepted
16 0 1 4

Datastream connection error from Python

Hi, I am getting following error in Python 3.7 :


import DatastreamDSWS as dsws
ds=dsws.Datastream(username='**************************',password='*********')

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.HTTPSConnection object at 0x00000000092F4AC8>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',))None

datastream-apidsws-apiconnection-error
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
38.1k 71 35 53

@grigorios.mamalis

It could be a network issue. Please test with the following command.

import socket
socket.getaddrinfo('product.datastream.com',443)



1618218879240.png (8.4 KiB)
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