Connecting using Python

Hello,


I have some problems using Datastream via python. I'm trying to connect to Datastream using the sample code with python code:

import DatastreamDSWS as DSWS
ds = DSWS.Datastream(username='NN', password='XX')
ds.get_data(tickers='VOD', fields='P', kind=0)

Using my correct username and password yields:


Exception: Invalid Token Value

_get_token : Exception Occured

(<class 'ModuleNotFoundError'>, ModuleNotFoundError("No module named 'wincertstore'"), <traceback object at 0x000002316A8F8248>)

None

get_data : Exception Occured

(<class 'Exception'>, Exception('Invalid Token Value'), <traceback object at 0x000002316A8B1848>)

None


The test web page http://product.datastream.com/DswsClient/Docs/TestSoapV1.aspx yields a valid results.


My python venv list is:

image

Python version is 3.7.6.


Does anyone know how I can this working?


Thank you for your help.

Best Answer

  • Jirapongse
    Jirapongse admin
    Answer ✓

    I am so sorry. That question is marked as private.

    You may need to install the wincertstore package.

    pip install wincertstore  

    Anyway, the wincertstore package is available on Windows.

Answers