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
21 1 3 2

Backend Error Failed to Deserialize backend Response

I am facing the same problem as mentioned in this thread. https://community.developers.refinitiv.com/questions/29948/eikon-data-api-backend-error-failed-to-deserialize.html

@pierre.faurel suggestion to use single quotes ' ' does not generate errors but the response is empty unlike the NEWS monitor app in EIKON desktop application.

It is also surprising the high quality EIKON tutorial series uses below syntax which is also generate errors. https://developers.refinitiv.com/eikon-apis/eikon-data-api/learning?content=15351&type=learning_material_item

q = "Product:IFREM AND Topic:ISU AND Topic:EUB AND (\"PRICED\" OR \"DEAL\")"

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apierrornews
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.

Upvote
Accepted
78.8k 250 52 74

@vijay.shah

Yes, you are correct. The code in the tutorial returns an error. I will contact the product team to verify it.

The solution that I can think of is using the triple backslashes to escape the double-quotes.

from datetime import date

start_date, end_date = date(2016, 1, 1), date.today()
q = "Product:IFREM AND Topic:ISU AND Topic:EUB AND (\\\"PRICED\\\" OR \\\"DEAL\\\")"
headlines = ek.get_news_headlines(query=q, date_from=start_date, date_to=end_date, count=100)
headlines.head()
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.

Upvote
21 1 3 2

@jirapongse.phuriphanvichai,

This works fine, thanks for quick response. I found below syntax is slightly more concise and also works without errors...

q = r'Product:IFREM AND Topic:ISU AND Topic:EUB AND (\"PRICED\" OR \"DEAL\")'

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
13.7k 26 8 12

@vijay.shah, @jirapongse.phuriphanvichai,

The following is even simpler, and works fine (tested in a Python Notebook, the result is not empty):

q = 'Product:IFREM AND Topic:ISU AND Topic:EUB AND (PRICED: OR DEAL:)'

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.

@jirapongse.phuriphanvichai,

As I'm in office today I quickly corrected the failing code in Evgeny's tutorial, to follow up on this customer query and avoid having other people run into the same issue. But the same code is also on Github. As you already liaised with the product team (Evgeny ?), and I will be on leave for 10 days, I let you follow-up for that one. Thank you :)

Upvotes
21 1 3 2

@Christiaan Meihsl very cool, did not know this is allowed.

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.