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

Best Answer

  • nick.zincone
    nick.zincone admin
    Answer ✓

    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"

Answers