Unittests fails at grading process. No module named 'unittests'

Although all tests are passed its failing to Grade it. “All tests passed!
If you made your solution in a different cell, make sure to include it in the graded cell as well.”

Its giving error - “There was a problem compiling the code from your notebook, please check that you saved before submitting. Details:
No module named ‘unittests’” This is blocking me to submit the assignment which is due tomorrow.

Typically this means one of several different errors:

  • You might have modified some cells in the notebook that the grader needed to use.
  • Your code might only work correctly for the notebook’s unit tests, but not for the tests the grader uses.

Tips:
Do not modify any cells other than the ones that tell you to add your code.
Do not move any cells.
Do not add any cells
Do not delete any cells.
Do not rename the notebook file.

Thanks Tom! Is there any way I could start from scratch for this assignment? I tried ‘refreshing’ by Getting the latest version but I still have my saved files, codes or whatever I might have deleted etc.

Before you can use “Get latest version”, you must either rename or delete any files you want replaced.

“Get latest version” only restores missing files - it doesn’t do anything if a file already exists.

1 Like

This helped. I renamed the existing assignment file and then Got the latest version. It restored assignment file as fresh and that I was able to submit for grading with no issues.

2 Likes

That’s good news!