โ05-05-2023 01:43 PM
I have configured the databricks CLI using token generated in Azure
databricks configure --aad-token
Configure is success.
When I used the command "databricks fs ls" I am running into an error as shown below
Error: AttributeError: type object 'Retry' has no attribute 'DEFAULT_METHOD_WHITELIST'
Can somebody point to me how to resolve this issue
โ05-05-2023 05:10 PM
I was able to solve the problem by updating the package urllib3 with a different version
pip3 install urllib3=1.25.11
โ05-05-2023 02:02 PM
@Venkata Suresh Chavalaโ can you try to test by providing dbfs at the end
databricks fs ls dbfs:/
it shows what directories exists in dbfs
โ05-05-2023 02:05 PM
Hi @karthik pโ ,
I got the same error. I am running on Mac
I ran in debug mode and here is the trace
databricks fs ls dbfs:/ --debug
HTTP debugging enabled
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/databricks_cli/utils.py", line 45, in decorator
return function(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/databricks_cli/configure/config.py", line 65, in decorator
kwargs['api_client'] = _get_api_client(config, command_name)
File "/usr/local/lib/python3.9/site-packages/databricks_cli/configure/config.py", line 104, in _get_api_client
return ApiClient(host=config.host, token=config.token, verify=verify,
File "/usr/local/lib/python3.9/site-packages/databricks_cli/sdk/api_client.py", line 106, in __init__
method_whitelist=set({'POST'}) | set(Retry.DEFAULT_METHOD_WHITELIST),
AttributeError: type object 'Retry' has no attribute 'DEFAULT_METHOD_WHITELIST'
Error: AttributeError: type object 'Retry' has no attribute 'DEFAULT_METHOD_WHITELIST'
Thanks,
Suresh
โ05-05-2023 05:10 PM
I was able to solve the problem by updating the package urllib3 with a different version
pip3 install urllib3=1.25.11
โ05-08-2023 01:04 AM
It seems the Databricks cli needs and update. This issue is discussed on StackOverflow. For the time being, installing an older version of `urllib3` should solve the issue. The method was removed since 2.X, the latest 1.X version is 1.26.15. You can use
pip install urllib3==1.26.15
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโt want to miss the chance to attend and share knowledge.
If there isnโt a group near you, start one and help create a community that brings people together.
Request a New Group