PYDSWS ds.getdata does not work

Hello,

I have an issue with the API trying to retrieve any data from Datastream using PYDSWS.
I've tested the connection and I successfully get the token.

It seems that the response from Datastream has changed or failed.

I have been using the request for years and I have not changed it.

I tried a simple and trivial request to check if it still gives me an error message and it does.

I copy below the kind of error I get:

"""

a= ds.get_data(tickers='VOD', fields='P,MV,VO', start='-10D', end='-0D', freq='D')

Traceback (most recent call last):


File "C:\Users\raiteri\AppData\Local\Temp/ipykernel_20332/2751661119.py", line 1, in <module>

a= ds.get_data(tickers='VOD', fields='P,MV,VO', start='-10D', end='-0D', freq='D')


File "C:\Users\raiteri\AppData\Local\Continuum\anaconda3\lib\site-packages\PyDSWS\datastream.py", line 102, in get_data

df = self.from_json_to_df(response)


File "C:\Users\raiteri\AppData\Local\Continuum\anaconda3\lib\site-packages\PyDSWS\datastream.py", line 41, in from_json_to_df

if response_json['Dates']:


KeyError: 'Dates'

"""

Thanks in advance

Eugenio



Best Answer

Answers