cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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

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.