question

Upvotes
Accepted
1 1 0 0

Connection problem with DSWS after upgrading to Python 3.9

I have recently upgraded my Python installation from 3.7 to 3.9. Previously we used an Anaconda installation, now we run “pure” Python.

Problem is, I can’t connect to the API, with the code I used before:

import DatastreamDSWS as DSWS
import os
http_proxy = "http://xx.xxx.net:8080"
https_proxy = "https://xx.xxx.net:8080"
os.environ['HTTP_PROXY'] = http_proxy
os.environ['HTTPS_PROXY'] = https_proxy
ds = DSWS.Datastream(username='USER', password="SECRET")


I get this error-message:


eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apidatastream-api
1612954484505.png (109.8 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.

Hello @soren.lolle

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS

@soren.lolle

Hi,

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 58 14 21

Hi @soren.lolle,

There are two mechanisms of providing proxy information to DSWS modules. Programmatically and through configuration files.

Try the following in your code:

import DatastreamDSWS as dsws 
ds = dsws.Datastream(username='XXXXXXX', password='XXXXXXX', proxy='https://proxy_user:proxy_password@proxyip:port')


Although, looking at your exception message, it does not look like a proxy issue. Seems like python instance does not like the SSL (WRONG_VERSION_NUMBER). It could be that your proxy re-signs the request and uses an older TLS version. Try to run your application from a network without a proxy server - so that you can rule out the issue with your python installation.

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.