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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
1 0 0 1

Error code 404 | Client Error

Hi,

since Monday I am experiencing the following error, when running a python script in which I fetch some data:

Error code 404 | Client Error: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">

<HTML><HEAD><TITLE>Not Found</TITLE>

<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>

<BODY><h2>Not Found</h2>

<hr><p>HTTP Error 404. The requested resource is not found.</p>

</BODY></HTML>


Before that I didn't have any problems. I have already restarted my machine and tried it again but it doesn't help.


eikon-data-apierrorerror-404
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.

Hi @wladislaw.strecker

Just to confirm, nothing has changed in your application or environment? The only thing that has changed is what you reported above? Does the error occur using the same call? Or is it random within your code? If consistent, can you provide the actual code snippet that is causing the above error? Thanks.

Nothing has changed, neither in my application nor in my environment. The error is caused by any get-function from eikon, for example if I execute

ek.get_timeseries('.SPX', 'CLOSE')

Upvotes
9.7k 49 38 60

Hi @wladislaw.strecker

Thanks for the confirmation. I just tried the get_timeseries() call a number of times without issue - within CodeBook as well as in my own dev setup.

I assume it is happening every time? Since last Monday?

Can we try turning on debugging and send the output? For example, if you can create a simple notebook like this and try within CodeBook:

import eikon as ek

ek.set_app_key('DEFAULT_CODE_BOOK_APP_KEY')
print(ek.__version__)
ek.set_log_level(5)
df = ek.get_timeseries('.SPX', 'CLOSE')
df

And also try within your own dev environment and provide screenshots for both. In your own dev, you will have to provide your own appkey.

Just to compare, this is what I see:

ahs.png

thanks.


ahs.png (121.3 KiB)
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.

I ran the code of yours in Codebook and in my own environment. In Codebook it works just fine, I get the same output as you:

1638262133901.png


On my own environment, on the other hand, I get the same error as before:

1638262267889.png

1638262133901.png (138.4 KiB)
1638262267889.png (39.4 KiB)
And yes, it is happening since Monday last week.
Hi @wladislaw.strecker

Can you please update your eikon package to the latest and try again? It looks quite outdated.

i updated to the newest eikon package version (1.1.14). Now I get the following error after my ek.set_app_key command:


2021-11-30 16:10:41,870 P[8240] [MainThread 13700] override steps (5) and chunk_size (512) as content does not fit (666 byte(s) given) parameters.

2021-11-30 16:10:41,936 P[8240] [MainThread 13700] override steps (5) and chunk_size (512) as content does not fit (666 byte(s) given) parameters.

2021-11-30 16:10:41,937 P[8240] [MainThread 13700] Error on handshake url http://127.0.0.1:9060/api/handshake : EikonError(1, 'Status code 400: App key is incorrect')

2021-11-30 16:10:41,938 P[8240] [MainThread 13700] Error on handshake url http://127.0.0.1:9060/api/handshake : EikonError(1, 'Status code 400: App key is incorrect')

2021-11-30 16:10:41,938 P[8240] [MainThread 13700] Port number was not identified, cannot send any request


Wenn I try ek.get_timeseries('.SPX', 'CLOSE'), I get:


1638285354108.png


1638285354108.png (44.4 KiB)
Upvotes
9.7k 49 38 60

Hi @wladislaw.strecker

Newer versions of the API have introduced a deeper validation of the App Keys and as it turns out I believe the appkey you have provided may be disabled. Can you generate a new AppKey and try again?

In the meantime, can provide me with your current appkey? I can confirm on my side. You can provide the key by commenting on this post and choosing "Viewable by moderators and the original poster" drop-down selection just below the "Submit" button.

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.

@nick.zincone,


I created a new app key and used it instead of the old one but I still get the same error messages.

Under the "Submit" Button there is no dropdown-selection on my screen:

1638433340770.png

1638433340770.png (51.1 KiB)
Upvotes
9.7k 49 38 60

Hi @wladislaw.strecker

The specific issue regarding why it fails after .set_app_key() is puzzling. However, you later demonstrate a loopback error when you make a get_timeseries() call which was also reported on this discussion: https://community.developers.refinitiv.com/questions/68116/trying-to-execute-code-from-codebook-to-a-python-f.html


In that discussion, it was suggested to:


To dig a bit deeper, could you try entering the following in the address bar of the Internet browser on the machine where you run your Python code and share the response: http://127.0.0.1:9060/api/status


In that other discussion, the issue could be related to proxy settings. I would suggest you read that discussion and try some of the suggestions and let me know what you have discovered.

thanks.

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