Question

Looker API connectivity Issue

  • 11 May 2021
  • 1 reply
  • 117 views

Hi,

I am trying to connect to the Looker API using Python and followed the documentation about how to use the API. I created the “looker.ini” file with the API credentials but it throws me the same error every time. Below is the snippet of code and the error. Appreciate any help.


import looker_sdk
import os
import json

sdk = looker_sdk.init31('looker.ini')

my_user = sdk.me()


##Below is the Error

SDKError: b"HTTPSConnectionPool(host='devamlooker.[company].com', port=9999): Max retries exceeded with url: /api/3.1/login (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fe0888e34d0>: Failed to establish a new connection: [Errno -2] Name or service not known'))"

 


This topic has been closed for comments

1 reply

This issue is resolved. We had the wrong port number in the host name.