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: 

"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.

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