When creating a post, please add:
When Code is run, all Unittests show as Passed.
But on submission, no Grades alloted, and the following error is shown in logs :-
There was a problem compiling the code from your notebook. Details:
name ‘w2_unittest’ is not defined
Notwithstanding, the module / package is imported in the initial lines.
Can you please help so that grades can be received ?
Hi! Firstly, welcome to our community!
This error usually arises when you added an import w2_unittests in any graded cell. Removing it should solve the issue.
Let me know if this helps.
Lucas
3 Likes
And the reason you added that extra “import” is probably that you got a “file missing” error when you ran that particular cell. That happens if you forget to rerun all the previous cells. You must run all the previous cells anytime you close and reopen the notebook or do a “Kernel → Restart”. Adding your own imports is not a good idea as we can now see. 
1 Like
Hi Paul@paulinpaloalto,
I am not sure whether I added the extra import insofar as I only changed the code where I was directed through the Comments. I also didn’t receive the “file missing” error. But anyways, it happened
.
Thanks for the detailed explanation though.
Best,
Deb