question

Upvotes
Accepted
166 2 1 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.

Hi @frank.ling1

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

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS

Upvotes
Accepted
79.1k 250 52 74

@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
22.1k 59 14 21

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.