Reputation: 2698
I'm trying to run the accepted answer mentioned here on a Azure Databricks Notebook which yields the following error ModuleNotFoundError: No module named 'dbutils'
After looking up the error I came across this post, however, I'm unable to determine whether the errors are similar. The post isn't very helpful either.
Running dbutils.fs.ls(path)
works but Importing the module using
from dbutils import FileInfo
yields the above error.
I'm also unable to deduce if this is an issue with different module names overlapping.
Please Advise.
Upvotes: 2
Views: 9816
Reputation: 87279
if you do type(dbutils)
you can find that it's dbruntime.dbutils.DBUtils
, not dbutils.something
. Similarly, if you do type(dbutils.fs.ls("/")[0])
, then you get dbruntime.dbutils.FileInfo
that could be imported as:
from dbruntime.dbutils import FileInfo
But real question - why do you need to import FileInfo
?
Upvotes: 2