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

**URL:** <https://community.deeplearning.ai/t/unittests-fails-at-grading-process-no-module-named-unittests/826351>\
**Category:** Introduction to Generative AI for Software Develop\
**Tags:** week-module-3, coursera-platform\
**Created:** [June 2, 2025, 11:03pm UTC](https://community.deeplearning.ai/t/unittests-fails-at-grading-process-no-module-named-unittests/826351 "2025-06-02T23:03:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![samroy24](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@samroy24](https://community.deeplearning.ai/u/samroy24)\
**Post date:** [June 2, 2025, 11:03pm UTC](https://community.deeplearning.ai/t/unittests-fails-at-grading-process-no-module-named-unittests/826351/1 "2025-06-02T23:03:11Z")

</div>

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.

 ![Screenshot 2025-06-02 at 5.59.42 PM](https://global.discourse-cdn.com/dlai/original/3X/e/0/e04982e3dc128fce7f9765ecab5577537b0a8545.png)

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [June 2, 2025, 11:25pm UTC](https://community.deeplearning.ai/t/unittests-fails-at-grading-process-no-module-named-unittests/826351/2 "2025-06-02T23:25:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![samroy24](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@samroy24](https://community.deeplearning.ai/u/samroy24)\
**Post date:** [June 2, 2025, 11:44pm UTC](https://community.deeplearning.ai/t/unittests-fails-at-grading-process-no-module-named-unittests/826351/3 "2025-06-02T23:44:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [June 3, 2025, 12:42am UTC](https://community.deeplearning.ai/t/unittests-fails-at-grading-process-no-module-named-unittests/826351/4 "2025-06-03T00:42:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![samroy24](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@samroy24](https://community.deeplearning.ai/u/samroy24)\
**Post date:** [June 3, 2025, 2:39pm UTC](https://community.deeplearning.ai/t/unittests-fails-at-grading-process-no-module-named-unittests/826351/5 "2025-06-03T14:39:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [June 3, 2025, 3:21pm UTC](https://community.deeplearning.ai/t/unittests-fails-at-grading-process-no-module-named-unittests/826351/6 "2025-06-03T15:21:25Z")

</div>

That’s good news!

---

<div class="post-metadata">

**Author:** ![AYESHA10](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@AYESHA10](https://community.deeplearning.ai/u/AYESHA10)\
**Post date:** [July 20, 2025, 7:10am UTC](https://community.deeplearning.ai/t/unittests-fails-at-grading-process-no-module-named-unittests/826351/7 "2025-07-20T07:10:53Z")

</div>

Can you kindly tell me how to “get latest version” show a screen short of “get latest version”.

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [July 20, 2025, 2:31pm UTC](https://community.deeplearning.ai/t/unittests-fails-at-grading-process-no-module-named-unittests/826351/8 "2025-07-20T14:31:17Z")

</div>

The “Get Latest Version” tool is in the Lab Help area, it is the “question mark inside a circle” icon.
