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

"import pandas as pd" => [Errno 5]

NAS
New Contributor III

When I type

import pandas as pd

from a Notebook in a Repo I get:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/usr/lib/python3.8/importlib/_bootstrap.py in _find_spec(name, path, target)
 
AttributeError: 'ImportHookFinder' object has no attribute 'find_spec'
 
During handling of the above exception, another exception occurred:
 
OSError                                   Traceback (most recent call last)
<command-897228870462433> in <module>
----> 1 import pandas as pd
 
/databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/__init__.py in import_patch(name, globals, locals, fromlist, level)
    156             # Import the desired module. If you’re seeing this while debugging a failed import,
    157             # look at preceding stack frames for relevant error information.
--> 158             original_result = python_builtin_import(name, globals, locals, fromlist, level)
    159 
    160             is_root_import = thread_local._nest_level == 1
 
/usr/lib/python3.8/importlib/_bootstrap.py in _find_and_load(name, import_)

But it works fine when invoked from a newly created Notebook in the same repo (or even in the Workspace).

This used to work well up until a few days ago.. when it stopped working. No other change was made to the Cluster during this time.

Best,

Nestor

1 ACCEPTED SOLUTION

Accepted Solutions

NAS
New Contributor III

Thanks to Elliott Hertz, I found out that the ML Experiments cannot be stored in the repo. After I moved them to my Workspace everything seems to work.

View solution in original post

1 REPLY 1

NAS
New Contributor III

Thanks to Elliott Hertz, I found out that the ML Experiments cannot be stored in the repo. After I moved them to my Workspace everything seems to work.

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.