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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
21 0 1 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-apipythonworkspaceworkspace-data-apirefinitiv-dataplatform-eikonerrornews
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
45.3k 103 44 60

@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 0 1 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.

Upvotes
21 0 1 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.