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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
5 1 0 2

Error code 404 | Client Error:

Hi, Im following the basic steps - I installed Python, I already have my Eikon Core, I got the App key and I try to run any request (data or headlines) but I get this error: Error code 404 | Client Error: <!DOCTYPE html>

Here is my code, its basic and comes from the Quickstart for this package:

import eikon as ek

ek.set_app_key('18........')

ek.get_news_headlines('R:LHAG.DE', date_from='2019-03-06T09:00:00', date_to='2019-03-06T18:00:00')

I also tried: headlines = ek.get_news_headlines('MSFT.O',10) and i also tried

df = ek.get_timeseries(["MSFT.O"],

start_date="2016-01-01",

end_date="2016-01-10")


But I always get that same error:

Error code 404 | Client Error: <!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<title>Error</title>

</head>

<body>

<pre>Cannot POST /api/v1/data</pre>

</body>

</html>


Traceback (most recent call last):

File "<pyshell#2>", line 1, in <module>

ek.get_news_headlines('R:LHAG.DE', date_from='2019-03-06T09:00:00', date_to='2019-03-06T18:00:00')

File "C:\Users\admin\AppData\Local\Programs\Python\Python37-32\lib\site-packages\eikon\news_request.py", line 120, in get_news_headlines

result = eikon.json_requests.send_json_request(News_Headlines_UDF_endpoint, payload, debug=debug)

File "C:\Users\admin\AppData\Local\Programs\Python\Python37-32\lib\site-packages\eikon\json_requests.py", line 121, in send_json_request

_raise_for_status(response)

File "C:\Users\admin\AppData\Local\Programs\Python\Python37-32\lib\site-packages\eikon\json_requests.py", line 244, in _raise_for_status

raise EikonError(response.status_code, error_msg)

eikon.eikonError.EikonError: Error code 404 | Client Error: <!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<title>Error</title>

</head>

<body>

<pre>Cannot POST /api/v1/data</pre>

</body>

</html>


Any help would be much appreciated.

Pat


PS: I think the issue is with the Key - if I put any gibberish as the key I get the same error. Note sure why my key is not working... maybe cause i'm using an eikon core? However Im able to get data using the Excel API ...

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
18k 21 12 20

Hi @pwb83

I checked and see that you are on Eikon Core variant.

Eikon Core does not include API features.

Please contact your account manager to see any available options.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

It would be better if Python showed this error: "Error - the Key does not work because of your Eikon variant" rather than the more ambiguous "Error code 404 | Client Error: <!DOCTYPE html> ". An alternative is for the Eikon terminal simply not to provide a Key in the APP Key - not sure why its giving me a key that ultimately I can't use.

Upvotes
38.1k 71 35 53

@pwb83

The Eikon API Proxy may not be running on the machine. The error code 404 is page not found.

Please follow steps in this article to verify if the Eikon API Proxy is running.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea