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

AttributeError: module 'pyspark.dbutils' has no attribute 'fs'

New Contributor III

`AttributeError` when attempting to transfer files from `dbfs` filestore in DataBricks to a local directory. 

 import pyspark.dbutils as pdbutils
  pdbutils.fs.cp("/dbfs/Data/file1.csv", "/Users/Downloads/")
  Traceback (most recent call last):
   File "/databricks/python/lib/python3.9/site-packages/IPython/core/", line 3378, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
   File "<command-1495140876495465>", line 4, in <module>
    pdbutils.fs.cp("/dbfs/Usage-Data/df_tx_0106_2022.csv", "/Users/keval/Downloads/")
  AttributeError: module 'pyspark.dbutils' has no attribute 'fs'


Honored Contributor
Honored Contributor

Hello @Keval Shah​ .

The import of dbutils is not explicitly required. (

You can use the steps below to copy the file (

dbutils.fs.cp("/FileStore/old_file.txt", "/tmp/new/new_file.txt") to copy the file.

I just listed"/mnt") and it works fine for a python notebook.

Hope this helps.

Thanks & Regards,


Not applicable

Hi @Keval Shah​ 

Thank you for posting your question in our community! We are happy to assist you.

To help us provide you with the most accurate information, could you please take a moment to review the responses and select the one that best answers your question?

This will also help other community members who may have similar questions in the future. Thank you for your participation and let us know if you need any further assistance! 

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!