Assignment, "TypeError: cannot unpack non-iterable NoneType object"

the first programing assignment in Neural Networks Basics: Logistic Regression with a Neural Network mindset.

I have completed all cells with “All test passed” for each cell. saved the assignment as “Save as Checkpoint”, and clicked “submit assignment”.

the grade shown as failed with 50/100.

from the Grade output, it is shown the error for every cells:

“TypeError: cannot unpack non-iterable NoneType object”

Most commonly, this means you left a “None” statement in the assignment, which you are expected to replace with your code.

Often this type of issue is caused by using global variables in the code you add. The global variables only exist in the notebook, and the grader doesn’t provide them.

each cell in the assignment completed with “All test passed”, no cell left, i then saved it, and submitted .

The grader runs all the cells in the notebook, not just the graded ones. Are you sure that all the cells run correctly if you do “Cell → Run All”. Did you try searching the notebook for intances of “None”?

OK, when completed all cells with “All tests passed” for each . did not know the feature of “Run all”. Saved with “Save and Checkpoint”. now restored from it. looked over all cells, they were all shown as “All tests passed”. However tried “Run All”, it failed on propagate_test(propagate) with " TypeError: cannot unpack non-iterable NoneType object". I do not understand , before last time “Save and Checkpoint” , it was shown as “All tests passed”.

You probably had introduced a bug in the code but had not actually clicked “Shift - Enter” to get the bug compiled into the runtime code. Doing the operations you did got things back in sync so WYSIWYG. So there is now a bug in your propagate implementation. Seems pretty clear where you need to look, right? :nerd_face:

To be completely sure things are in sync, you can do “Kernel → Restart and Clear Output”, then “Save”, then “Cell → Run All” and see if it still fails that test.

Here’s a thread which explains in more detail the nature of the “inconsistent state” problem that I’m referring to above.

Thanks Sir. done all of Kernel*, save , run all again, still failed the same. checked over and over, yet found the bug.
i will try to test it on my own system.

Sorry, but I don’t see the point of testing it in a different environment. If you are still having problems getting this to work in the course environment, please check your DMs for a message from me.

the problem has been identified. the function was tested good , and tested the rest of cells good, somehow during the work after the function, in the function “return *” was deleted. the note saved without “Run All”. the saved copy restored, and failed with “Run All”.