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

dbutils.fs.ls is giving "null uri host This can be caused by unencoded / in the password string"

antoniok
New Contributor II

I'm trying to list number of files in s3 bucket. I've initially used "aws s3 ls <s3://>" to list the files and it worked. However, when trying to do the same using dbutils.fs.ls, I'm getting

java.lang.NullPointerException: null uri host. This can be caused by unencoded / in the password string

My main goal is to export this list of output in either a txt or csv file and save in somewhere in DBFS. Would it be possible to do so just using bash? If not, how would you fix this error using dbutils.fs.ls? Thank you for your time

1 REPLY 1

marcus1
New Contributor III

You might be encountering an issue with bucket naming. Which I'm also getting with a bucket named something.[0-9]

https://issues.apache.org/jira/browse/HADOOP-17241

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.