question

Upvotes
Accepted
16 0 5 6

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

1 Answer

Upvotes
Accepted
45.2k 103 43 60

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