New posts are disabled while we improve the user experience.

You can browse the site, or for urgent issues, raise a query at MyAccount.

question

Upvotes
Accepted
16 5 8 12

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

· Write an Answer
Upvotes
Accepted
87.8k 294 53 79

@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.

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.