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-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythondatastream-api
1612954484505.png (109.8 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.

1 Answer

Upvotes
Accepted
13k 32 12 18

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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea