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: 

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

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