question

Upvotes
Accepted
2 0 0 1

Error handling on Refinitiv Data Library for Python

Hi, I'm using the refinitiv.data module to access data from the Refinitiv Data Library for Python. I'm looking for a way to handle errors. With the previous eikon module i had something like this implemented;

try:
    data_new, e = ek.get_data(instruments, field)
except ek.EikonError:
    handle error in code

when i try;

try:
    data_new, e = rd.get_data(universe=instruments[a:b], fields=field)
except rd.RDError:
    handle error in code

I''m getting;

AttributeError: No refinitiv.data attribute RDError


Could you help me mimic the same behavior for rd as i had with ek?

Also is there an overview somewhere of all available errors?

Many thanks for your help on this!

#technologypython apirefinitiv-data-libraries
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.

1 Answer

· Write an Answer
Upvotes
Accepted
119 6 7 18

dear @Jurriaan

you should use rd.errors.RDError to catch Rd error.


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.

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.