Solved

Getting SDKError without error message

  • 9 November 2021
  • 2 replies
  • 17 views

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. 

 

icon

Best answer by leobardor 10 November 2021, 07:53

View original

2 replies

Userlevel 1

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

 

  • 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

 

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!

Reply