question

Upvotes
Accepted
1 0 0 0

Refinitiv Data Library News Headlines Error

I'm running the following code for a large group of ISINs (roughly 10,000):

import refinitiv.data as rd

rd.open_session()

for isin in ISIN_List:

query = rd.news.get_headlines("ISIN:"+isin +" and Topic:CVRSY")

query"


I've gotten this to work with individual ISINs from the group but got the following error after about 20 minutes of running:

RDError: Error code 400 | Query cannot return any result.

Just wanted some clarification on what this exactly means, I was expecting some sort of time-out error given the large number of ISINs. Can this error result from a time-out? Or could it be something separate

python#technologyrefinitiv-data-platform
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.

@cole

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

@cole

Hi,

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

Thanks,

AHS

Upvotes
Accepted
17.4k 82 39 63

Hi @cole

There are some things you can try when troubleshooting. First, is the error occurring at the exact same place every time? If so, which specific ISIN are you getting news for? Did you try that ISIN on its own? If the error occurs at random spots, try shrinking the list of ISINs to see what the tolerance level is. The error appears to be fairly generic, but you may be able to get more details by turning on debugging:

# Enable logging
#rd.get_config()["logs.level"] = "debug"

# Console
#rd.get_config()["logs.transports.console.enabled"] = True

# File
#rd.get_config()["logs.transports.file.enabled"] = True
#rd.get_config()["logs.transports.file.name"] = "data-lib.log"
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.

It's not giving me any output before the error occurs so I'm unable to tell where it's failing. Would enabling the debugging get me more info on where it's failing?

Upvotes
17.4k 82 39 63

Hi @cole

Enabling logs will provide more information as to what may be happening. I would also shrink you list of ISINs to determine the tolerance level of the request. You said you can get it to work for 1. Jumping to 10,000 is clearly causing issues. Try to break it up. Try 50, 250, etc.

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.