You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the pytest command from within the terminal in the venv works just fine. However, when using the VS code test plugin to discover the tests I get this error:
.venv\lib\site-packages\databricks\sdk\config.py:130: in __init__
raise ValueError(message) from e
E ValueError: default auth: cannot configure default credentials, please check https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication to configure credentials for your preferred authentication method. Config: host=MY_HOST, auth_type=databricks-cli, cluster_id=MY_CLUSTER_ID
Anyone any idea on how to solve this?
The text was updated successfully, but these errors were encountered:
Do you have DATABRICKS_PROFILE env var set in the terminal? This error can happen when we can't identify what profile to use for the auth. By default we look into ~/.databrickscfg file for the DEFAULT profile, and if we can't find it, then auth fails. You don't need to have DEFAULT profile, and instead specify the name directly in the code like this:
In the earlier provided error it does seem like Databricks can find this profile (showing MY_HOST and MY_CLUSTER_ID in the provided error). I also tried it with explicitly setting the profile to DEFAULT:
I have the same error - terminal pytest works, while vscode plugin doesn't - when running the main_test.py file that comes with the stub when creating a new databricks project using the databricks-connect plugin
I am using VS code with databricks-connect v2.4.8, and I wrote some pytests. In
conftest.py
I created a fixture:Running the pytest command from within the terminal in the venv works just fine. However, when using the VS code test plugin to discover the tests I get this error:
Anyone any idea on how to solve this?
The text was updated successfully, but these errors were encountered: