cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Databricks fs ls does not work

Suresh_AWS
New Contributor III

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

1 ACCEPTED SOLUTION

Accepted Solutions

Suresh_AWS
New Contributor III

I was able to solve the problem by updating the package urllib3 with a different version

pip3 install urllib3=1.25.11

View solution in original post

4 REPLIES 4

karthik_p
Esteemed Contributor

@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

Suresh_AWS
New Contributor III

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

Suresh_AWS
New Contributor III

I was able to solve the problem by updating the package urllib3 with a different version

pip3 install urllib3=1.25.11

abos
New Contributor II

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

Connect with Databricks Users in Your Area

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