Getting SDKError without error message

Hello, I'm using the looker_sdk to create a jupyter notebook with python 3.9. My script is configured with environment variables and it seems to work well but when I call any function of Looker API, in my case all_users(), I'm getting SDK_Error: b'' (without descriptive message). I didn't find anything related to this. 

b5349a3b-69cb-40eb-b33f-410d77ef6778.png
Solved Solved
0 2 1,381
1 ACCEPTED SOLUTION

Hi Juliodias,

When setting up looker.ini file in your python project, you will find the following example variable:

base_url=base_url=https://<your-looker-endpoint>:19999"

Now, finding the API looker instance port is needed to set the connection.

According to the Looker - API config documentation :

If your Looker admin has not specified the API Host URL field, Looker uses the default API path. For Looker instances hosted on Google Cloud Platform (GCP), Microsoft Azure, and instances hosted on Amazon Web Service (AWS) that were created on or after 07/07/2020, the default Looker API path uses port 443. For Looker instances hosted on AWS that were created before 07/07/2020, the default Looker API path uses port 19999.


 

  I recreated the error message when the port is not present in the base_url variable, looker.ini file:

base_url=https://abcinstance.testing.looker.com
e0569950-68f1-4bdf-ada1-5f9fad243075.png
  • Solution

 In  my  looker.ini file, for example, I had to add the port 19999 in the variable base_url:

base_url=https://abcinstance.testing.looker.com:19999
d870c765-9c8b-4441-9079-3a0785d09340.png

Hope this helps python-looker developers that are setting up their API for the first time.

#API #sdk #python  #looker #login #looker.ini

Regards,

Leo

View solution in original post

2 REPLIES 2

Hi Juliodias,

When setting up looker.ini file in your python project, you will find the following example variable:

base_url=base_url=https://<your-looker-endpoint>:19999"

Now, finding the API looker instance port is needed to set the connection.

According to the Looker - API config documentation :

If your Looker admin has not specified the API Host URL field, Looker uses the default API path. For Looker instances hosted on Google Cloud Platform (GCP), Microsoft Azure, and instances hosted on Amazon Web Service (AWS) that were created on or after 07/07/2020, the default Looker API path uses port 443. For Looker instances hosted on AWS that were created before 07/07/2020, the default Looker API path uses port 19999.


 

  I recreated the error message when the port is not present in the base_url variable, looker.ini file:

base_url=https://abcinstance.testing.looker.com
e0569950-68f1-4bdf-ada1-5f9fad243075.png
  • Solution

 In  my  looker.ini file, for example, I had to add the port 19999 in the variable base_url:

base_url=https://abcinstance.testing.looker.com:19999
d870c765-9c8b-4441-9079-3a0785d09340.png

Hope this helps python-looker developers that are setting up their API for the first time.

#API #sdk #python  #looker #login #looker.ini

Regards,

Leo

@leobardor , many thanks!!! It worked!