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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
1 0 0 0

code error in get_news_story function

Dear Eikon,

There is an error inside the ek.get_news_story function. This error is inside line:

if raw_output:

return json_data

else:

---> return json_data["story"]["storyHtml"] <---- this line


This error occurs with the following params:

if storyId is a webUrl

example:

storyId = "urn:link:webnews:20201030:nNRAdcocad:0"

data = ek.get_news_story(storyId=storyId, raw_output=True)

gives this output: {“webURL”: 'www.'}

if raw_output = False then the error occurs because the term "story" is not inside the dictionary 'data'.

eikoneikon-data-apipythonworkspaceworkspace-data-apirefinitiv-dataplatform-eikonjson-decode-error
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

Upvotes
7.4k 10 6 8

Hi @h.k. Thanks for pointing out this issue - we can indeed replicate this and the dev team are now investigating and will get back to you shortly.

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.