cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Workspace client creation error

databrick_usert
New Contributor

Hi,

We are trying to use Python SDK and create a workspace client using the following code:

%pip install databricks-sdk --upgrade

dbutils.library.restartPython()

from databricks.sdk import WorkspaceClient

w = WorkspaceClient()

Here is the notebook: https://zg-core-tech-lab.cloud.databricks.com/?o=1374115405812811#notebook/1956674069935518/command/...

And the compute cluster we are using is:

https://zg-core-tech-lab.cloud.databricks.com/compute/clusters/0320-052046-zfcxwjvb?o=13741154058128...

However, the above code throws error as:

default auth: cannot configure default credentials

The above code used to work for workspace 

https://zg-data-eng-dev.cloud.databricks.com/?o=6867857852215282#files/1746507398130712

and cluster https://zg-data-eng-dev.cloud.databricks.com/compute/clusters/1214-223614-clopq8r5?o=686785785221528...

Can anyone please share how to fix?

Thank you

 

 

1 REPLY 1

Ayushi_Suthar
Honored Contributor
Honored Contributor

Hi @databrick_usert , Hope you are doing well! 

Can you check the version of the SDK running in this notebook? If it's not an upgraded version then could you please try to upgrade the SDK version and then restart the python after the pip install? 

%pip install databricks-sdk-py --upgrade

You can refer to this document to upgrade to the SDK version : 

https://learn.microsoft.com/en-us/azure/databricks/dev-tools/sdk-python#--get-started-with-the-datab...

Also, i am sharing the reference link for this issue, hoping it will help you. 

https://github.com/databricks/databricks-sdk-py/issues/221

Please let me know if this helps and leave a like if this information is useful, followups are appreciated.
Kudos
Ayushi

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.