Cell #5. Can’t compile the student’s code. Error: NameError(“name ‘get_sub_volume’ is not defined”,)
Error after submission and checking for grading
Cell #5. Can’t compile the student’s code. Error: NameError(“name ‘get_sub_volume’ is not defined”,)
Error after submission and checking for grading
The variable with that name might not be defined or the cell containing its declaration might not be run or you might be hard coding it as a global variable when its also used downstream on a particular setting/function.
Please realize that no-one but the course staff can follow a link to your personal copy of your notebook.
If everything runs correctly in your local notebook, but fails the grader, then it must mean you’ve “hard-coded” something or referenced a global variable in the scope of one of your functions or perhaps you’ve even converted a cell from being code to being “markdown”. Please search your notebook for the string get_sub_volume
and look carefully at the contents of any cells that reference that variable.
Hi @Ankita_Nainwal,
No one can take a look at your assignment by you sharing the link of it. Anyone who clicks on this link will be taken to their version of the assignment in their workspace.
Looking at the error you shared, it is possible that you made a change in the assignment where you were not expected to. I’d recommend to follow these instruction to get a fresh copy of the notebook and try again.
If you still come across the same issue, let me know.
Best,
Mubsi