question

Upvotes
Accepted
166 2 0 3

Error: unexpected argument "retName" when I try to get name of datatype

I want to get the name of datatype following datastreamDSWS help but in vain.

My code: ds.get_data(tickers='@AAPL', fields='WC08311',retname=True)

Error message:1680012091888.png

The argument shall be there I suppose.

1680010483681.png

Can you please advise alternative way if available?

#technologydatastream
1680010483681.png (34.9 KiB)
1680012091888.png (29.2 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.

Upvotes
Accepted
76.7k 238 52 72

@frank.ling1

You can use the suffix (|N) instead. For example:

ds.get_data(tickers='@AAPL|N', fields=['WC08311'])

The output is:

1680141764199.png


1680141764199.png (17.2 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.

Upvotes
21.4k 56 14 20

Hi @frank.ling1,

It appears to be a bug in the library. The parameter retName is listed in the documentation and the get_data function uses it as well, but it is not defined as one of the arguments to the library function call - which is why you are getting this error.

def get_data(self, tickers, fields=None, start='', end='', freq='', kind=1):

I will raise this bug with Refinitiv Support.


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.

I am unable to create a ticket on behalf of Refinitiv users. Please go to my.refinitiv.com and raise a support ticket for DSWS. Thanks.

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.