Course 2, Week 2 "ModuleNotFoundError" Error

When I execute the cell with the import statements that come as part of the notebook I get a “ModuleNotFoundError” error and it mentions “dlai_tools”. This is an error in the provided notebook and not in my code. Can someone please fix this error please otherwise I cannot proceed? Here is the error message from executing the very first cell in the notebook:

I have the same problem. Do you figure out how to deal with it?

It was okay when I went back to try it a day later. I think the content developer had taken out the module, maybe for further development, and I wish they would tell us when they pull out a module like that. I finished my assignment. Maybe they have pulled it out again.

Glad it’s working for you, @ckangai.

You could try updating the notebook, @Tonny.

Thank you!~ I just finish the assignment and found that the problem only comes out in sometime (not always). Anyway, It seem to have been repaired!~ :grin:

1 Like

The same problem, I updated the file, and still the same.

I’m having this issue as well. Can’t even start the exercise.

Just found the fix. Look at the “how to refresh your workspace” exercise in the course.

The key is renaming the file. Note that the grader also only accepts a file with the original file name so you’ll have to rename the file AGAIN (back to the original).

All good points! The other thing to remember is you need to delete all the “dot py” files e.g. public_tests.py when you do the “refresh” in order to make sure you get the new versions.

All that is mentioned on the relevant topic on the FAQ Thread.

that didn’t work for me, it’s the second time that happens to me and I think I have to wait until the next day, like yesterday. Because today I have that kind of error trying to call another function in the exercise 2, and when I run the python notebook again, the error appeared in the import section again

Hi all ,
I had same issue with the locally missing dlai_tools package and solved it this way on poetry environment:

poetry add dlai_tools

For (ana/mini)conda environments:

conda install dlia_tools

using PyPi:

pip install dlai_tools

From Jupyter notebook:

!pip install dlai_tools

@ckangai I hope you succeeded your course by now. :wink:

I wish this would help.
Bye

1 Like

The dlai_tools package is not distributed with the notebook files - it’s an external package.

I believe this is a unique situation for this particular lab.