What is the cause of this error: P[25380] [MainThread 22280] Error code 404 | Client Error:

I tried running the following script and got this error. How do I know if this is because of some configuration error or if I simply don't have permission to extract this data?

import eikon as ek

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

start_date="2016-01-01",

end_date="2016-01-10")

Best Answer

Answers

  • @rodrigo.hideki

    Thank you for reaching out to us.

    Please enable logging in the API to verify what the problem is. You can try the following code.

    import eikon as ek
    ek.set_log_level(1)
    ek.set_app_key('<app key>')
    df = ek.get_timeseries(["MSFT.O"],start_date="2016-01-01",end_date="2016-01-10")
    df

    Then, please share the full output.

  • @Jirapongse thanks for your support.


    After running what you suggested, I got the following error. Do you know what the cause for that is?


    2023-09-05 13:51:51,704 P[25400] [MainThread 23072] Reset a Desktop session with new app_key

    2023-09-05 13:51:51,708 P[25400] [MainThread 23072] Unlock login_event for streaming session 0 due to stop streaming call

    2023-09-05 13:51:51,715 P[25400] [MainThread 23072] Warning: file .portInUse was not found. Try to fallback to default port number.

    2023-09-05 13:51:51,717 P[25400] [MainThread 23072] Try defaulting to port 9000.

    2023-09-05 13:51:51,720 P[25400] [MainThread 23072] Send GET request to http://127.0.0.1:9000/api/status to detect API Proxy...

    2023-09-05 13:51:51,722 P[25400] [MainThread 23072] Request to http://127.0.0.1:9000/api/status

    headers = {'x-tr-applicationid': 'key....'}

    params = None

    2023-09-05 13:51:51,746 P[25400] [MainThread 23072] Send request with headers [(b'Host', b'127.0.0.1:9000'), (b'Accept-Encoding', b'gzip, deflate, br'), (b'Connection', b'keep-alive'), (b'User-Agent', b'python-httpx/0.23.0'), (b'Accept', b'application/json'), (b'x-tr-applicationid', ')] and cookies None

    2023-09-05 13:51:51,749 P[25400] [MainThread 23072] HTTP request response 404: <!DOCTYPE html>

    <html lang="en">

    <head>

    <meta charset="utf-8">

    <title>Error</title>

    </head>

    <body>

    <pre>Cannot GET /api/status</pre>

    </body>

    </html>