Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
135 15 10 10

Trying to reproduce new issues in the news tutorial

Hello! I am trying to reproduce the tutorial from the Developer Website with no success:

https://developers.refinitiv.com/eikon-apis/eikon-data-api/learning?content=15351&type=learning_material_item

The code itself:

from datetime import date

start_date, end_date = date(2010, 1, 1), date.today()
q = "Product:IFREM AND Topic:ISU AND Topic:EUB AND (\"PRICED\" OR \"DEAL\")"
headlines = tr.get_news_headlines(query=q, date_from=start_date, date_to=end_date, count=100, raw_output=False)
headlines.head()

Error message:

2020-03-12 13:14:43,924 P[17328] [MainThread 13732] Backend error. Failed to deserialize backend response. Expected valid JSON. Error: invalid character 'i' looking for beginning of value

Could you please help?

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apinewsissue
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
Upvote
Accepted
25.3k 87 12 25

Hi @alex.yermolayev

I just tried the following as per the tutorial and it works Ok

start_date, end_date = date(2010, 1, 1), date.today()
q = "Product:IFREM AND Topic:ISU AND Topic:EUB AND (PRICED OR DEAL)"
headlines = tr.get_news_headlines(query=q, date_from=start_date, date_to=end_date, count=100, raw_output=False)
headlines.head()

If I add the \" back in, then I get the same error as you do.


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.

Many thanks, Umer @

I saw the error and corrected it. I downloaded the source code from the link on github, I guess the string formatting is not correct there.

Hi @alex.yermolayev

Apologies for the problem and thanks for pointing out the differences on github. I have alerted the example owner.

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.