I completed all tasks in the program correctly with the result ‘All tests passed’, however, when I submit it for grading, the grader gives me 0 points due to the following error:
'Cell #7. Can’t compile the student’s code. Error: AttributeError(“‘NoneType’ object has no attribute ‘add’”.
Please help me as my entire notebook is correct. I have no idea what to do. I restart the kernel and use the latest version as well, but the same error persist.
If you’re sure that all the cells in the network run successfully when you run it yourself, but get this error from the grader, there are a couple of possible theories:
As Tom described, you might have corrupted the notebook somehow. One way to do that would be running it on a different platform like Colab.
There could be some way in which your code is not “general”. For example, referencing global variables instead of the parameters passed to your functions. Maybe one of those is not defined in the grader context, which is where that error about “Nonetype” object is coming from.
Remember to write your code inside the “your code starts here” block, remove anything you have written outside or any extra cell created by you, and remove all the extra print statements made by you. Mine works fine, just did it yesterday.