How to fix "No module named 'w2_unittest'"

Hi,
I am new to Python. Can anyone help me fix this error in my lab assignment for week 2?

1 Like

I think you might have changed something you are not supposed to from the Lab itself.

Its better to rest the whole lab now, follow the steps here:

https://www.coursera.support/s/article/360004995312-Solve-problems-with-Jupyter-Notebooks?language=en_US

1 Like

Are you using Coursera Labs, or did you download the assignment to some other platform?

1 Like

Hi @Maryam_adz

Please ensure that you’ve executed the first cell of the notebook to import the necessary libraries including w2_unittest. If the issue persists, try backing up your answers, restoring the initial version of the notebook from the checkpoints section, and then rewriting your code.

1 Like

These are the first two code cells in the notebook.
image

Not much to go wrong in that.

2 Likes

I had initially downloaded the assignment, but I was able to resolve the issue by using Coursera Labs. Thanks for your help.

1 Like

Thanks for your update.

1 Like