# WK 1, Ex. 2: NameError when submitting to grade

**URL:** <https://community.deeplearning.ai/t/wk-1-ex-2-nameerror-when-submitting-to-grade/878839>\
**Category:** Convolutional Neural Networks\
**Tags:** week-module-1\
**Created:** [September 8, 2025, 2:23pm UTC](https://community.deeplearning.ai/t/wk-1-ex-2-nameerror-when-submitting-to-grade/878839 "2025-09-08T14:23:41Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![paulinpaloalto](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/paulinpaloalto/32/187_2.png) [@paulinpaloalto](https://community.deeplearning.ai/u/paulinpaloalto)\
**Post date:** [September 8, 2025, 2:55pm UTC](https://community.deeplearning.ai/t/wk-1-ex-2-nameerror-when-submitting-to-grade/878839/4 "2025-09-08T14:55:22Z")

</div>

That must mean that the problem is that you have accidentally damaged the notebook and removed some code (the _second_ point that Saif made above). E.g. accidentally changed the cell that does the “import” commands to be a Markdown cell instead of a Code cell or something like that.

The best strategy is to get a clean copy of the notebook and start over. You can save your existing work and just carefully copy/paste that in. But be very careful only to modify the “YOUR CODE HERE” sections. [Here’s a thread](https://community.deeplearning.ai/t/how-to-get-a-clean-copy-of-an-assignment-notebook/73) about how to get a clean copy.

---

_[View the full topic](https://community.deeplearning.ai/t/wk-1-ex-2-nameerror-when-submitting-to-grade/878839)._
