Looker API not found error

Hi All,

I have been trying to connect to my company looker API through Python.

I have declared the environment variables and the init part is working fine. Any help is appreciated.

But when I want to access a dashboard with an id it shows this error

SDKError: <!DOCTYPE html>
<html>
<head>
    <title>Looker Not Found (404)</title>
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600' rel='stylesheet' type='text/css'>

    <!-- @@@@@@@@@@@@@ FAVICONS @@@@@@@@@@@@@ -->

    <link rel="apple-touch-icon-precomposed" sizes="57x57" href="https://wwwstatic-b.lookercdn.com/favicon/apple-touch-icon-57x57.png" />
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="https://wwwstatic-c.lookercdn.com/favicon/apple-touch-icon-114x114.png" />
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="https://wwwstatic-d.lookercdn.com/favicon/apple-touch-icon-72x72.png" />
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="https://wwwstatic-a.lookercdn.com/favicon/apple-touch-icon-144x144.png" />
    <link rel="apple-touch-icon-precomposed" sizes="60x60" href="https://wwwstatic-b.lookercdn.com/favicon/apple-touch-icon-60x60.png" />
    <link rel="apple-touch-icon-precomposed" sizes="120x120" href="https://wwwstatic-c.lookercdn.com/favicon/apple-touch-icon-120x120.png" />
    <link rel="apple-touch-icon-precomposed" sizes="76x76" href="https://wwwstatic-d.lookercdn.com/favicon/apple-touch-icon-76x76.png" />
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="https://wwwstatic-a.lookercdn.com/favicon/apple-touch-icon-152x152.png" />
    <link rel="icon" type="image/png" href="https://wwwstatic-b.lookercdn.com/favicon/favicon-196x196.png" sizes="196x196" />
    <link rel="icon" type="image/png" href="https://wwwstatic-c.lookercdn.com/favicon/favicon-96x96.png" sizes="96x96" />
    <link rel="icon" type="image/png" href="https://wwwstatic-d.lookercdn.com/favicon/favicon-32x32.png" sizes="32x32" />
    <link rel="icon" type="image/png" href="https://wwwstatic-a.lookercdn.com/favicon/favicon-16x16.png" sizes="16x16" />
    <link rel="icon" type="image/png" href="https://wwwstatic-b.lookercdn.com/favicon/favicon-128.png" sizes="128x128" />
    <meta name="application-name" content="Looker"/>
    <meta name="msapplication-TileColor" content="#FFFFFF" />
    <meta name="msapplication-TileImage" content="https://wwwstatic-c.lookercdn.com/favicon/mstile-144x144.png" />
    <meta name="msapplication-square70x70logo" content="https://wwwstatic-d.lookercdn.com/favicon/mstile-70x70.png" />
    <meta name="msapplication-square150x150logo" content="https://wwwstatic-a.lookercdn.com/favicon/mstile-150x150.png" />
    <meta name="msapplication-wide310x150logo" content="https://wwwstatic-b.lookercdn.com/favicon/mstile-310x150.png" />
    <meta name="msapplication-square310x310logo" content="https://wwwstatic-c.lookercdn.com/favicon/mstile-310x310.png" />

    <style type="text/css">
        body {
            background-color: #2e343f;
            color: white;
            height: auto;
            font-family: Open Sans, Helvetica, Arial, sans-serif;
        }
        .message {
            width: 100%;
            max-width: 760px;
            margin: 0 auto;
            margin-top: 135px;
            text-align: center;
        }
        h2, h3 {
            font-weight: normal;
        }
        a {
            color: white;
        }
    </style>
</head>
<body>

    <div class="message">

        <img width="210" height="84" src="https://wwwstatic-a.lookercdn.com/logos/looker_all_white.svg" alt="Looker">

        <h1>Looker is unavailable.</h1>

        <h2>If you typed in a URL, double-check the spelling.</h2>
        <h2>This may also be due to a temporary condition such as an outage, <a href="https://docs.looker.com/relnotes/hosted-maintenance-hours">scheduled maintenance</a> or upgrade.</h2>
        <br>
        <h3>
          If this message persists or you have any concerns, <br> contact us from
          <a href="https://help.looker.com">help.looker.com</a> and we'll respond promptly.
        </h3>

    </div>

</body>
</html>

2 5 1,626
5 REPLIES 5

I have the exact same problem. Did you find a solution?

I've had a python code with this call to looker_sdk which was running just fine.
It is failing now with the same 'Looker not found (404): Looker is unavailable.' error, and I also could not find anything that could give me the answer what is wrong. I'll update this thread if I would find the cause.

 

What seems to work for me is updating the Looker API Version from 3.1 to 4.0 in my configuration settings. 

I made a workaround so I'm not using it anymore but this seems to work. 

Nev
Explorer

I have a similar issue. Mine is getting a user's scheduled plans.

Here are minimal steps to reproduce.

> conda create -yqn temp python=3.10 
> conda activate temp # For the env.
> pip install looker_sdk # pip to ensure the latest from pypi, not something different from Conda.
> export LOOKERSDK_CLIENT_ID=<id>
> export LOOKERSDK_CLIENT_SECRET=<secret>
> python
>>> import looker_sdk
>>> plans = looker_sdk.init40().all_scheduled_plans(user_id=125)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/nevd/miniconda3/envs/lookersftp/lib/python3.10/site-packages/looker_sdk/sdk/api40/methods.py", line 10612, in all_scheduled_plans
self.get(
File "/home/nevd/miniconda3/envs/lookersftp/lib/python3.10/site-packages/looker_sdk/rtl/api_methods.py", line 141, in get
response = self.transport.request(
File "/home/nevd/miniconda3/envs/lookersftp/lib/python3.10/site-packages/looker_sdk/rtl/requests_transport.py", line 66, in request
headers.update(authenticator(transport_options or {}))
File "/home/nevd/miniconda3/envs/lookersftp/lib/python3.10/site-packages/looker_sdk/rtl/auth_session.py", line 100, in authenticate
token = self._get_token(transport_options)
File "/home/nevd/miniconda3/envs/lookersftp/lib/python3.10/site-packages/looker_sdk/rtl/auth_session.py", line 87, in _get_token
self._login(transport_options)
File "/home/nevd/miniconda3/envs/lookersftp/lib/python3.10/site-packages/looker_sdk/rtl/auth_session.py", line 148, in _login
response = self._ok(
File "/home/nevd/miniconda3/envs/lookersftp/lib/python3.10/site-packages/looker_sdk/rtl/auth_session.py", line 240, in _ok
raise error.SDKError(response.value.decode(encoding="utf-8"))
looker_sdk.error.SDKError: <!DOCTYPE html>
<html>
<head>
<title>Looker Not Found (404)</title>

 

 

Nev
Explorer

I've sent their support screenshots showing it working in the Looker API Explorer, not working in using the SDK, and showing that it fails with HTML instead of a JSON response regardless of whether the user exists, and particularly, that instead of returning 404 and a JSON response when the user it not found, for a non-existent user it completes with an 200 and an empty response (no plans), that is, it doesn't do what the API doco says it should when it is working.