C1W3 Kernel Error - Cannot work/submit on Final Lab


I cannot work or submit the Final Lab. The Coursera Lab and Python kernel is giving an error. The kernel seems to not want to start at all with the error " ‘_xsrf’ argument missing from POST ".

Extra Info: I am able to download the files locally to my system, and the files and notebook works fine.

I need help as soon as possible - due today, Sep-04.

Thank you.

You cannot run the grader from your local system. Please use Coursera Labs

On the other hand, from the error message, there is an error in code cell #8, so please go to your notebook on coursera, click “Kernel” > “Restart & run all”, then as the code cell finishes running, a number will appear to the left of it and keep following that until you reach number 8 where you should see additional error traceback in the bottom of that cell. You should be using a variable g that’s not defined in any previous cell and here is where you start debugging. If that’s because the g is being used in your sigmoid function implementation, then make sure it’s defined because by default g is the thing to be returned and it’s the exercise itself to define g.


Thanks for feedback. No change/same issue with multiple tries in the different times of the day.

Correct, I ran the notebook locally to see if I had syntax issues or other problems. Running it on the online lab did nothing. I cannot even modify/save the notebook with my edits - hence not able to submit properly.

Correct, I tried all the options to restart the kernel and still the same issue. As mentioned above, I cannot save my edits to the notebook and that is why it is failing on cell 8 or so. I did try to submit just to see where it fails and the output provided by the grader is as follows:

Cell #8. Can’t compile the student’s code. Error: NameError(“name ‘g’ is not defined”)

From my testing, the grader only sees the default notebook with the blank entries I am suppose to enter. The assignment of g is the first question asked to define the sigmoid formula, hence the output error.

I did report immediately earlier today to Coursera at least for this particular lab.

I did have the same issues with some of the previous optional practice labs as well - having the kernel error and not able to restart it.

You cannot grade a notebook that has been renamed. The grader always uses the default notebook, regardless of the name of the notebook you have open.

It sounds like you may be doing some consistent procedural error.


Not sure why I did not think of this sooner. Browser issue - using a customized browser configuration. I tried another browser and it was working fine - Course finished.

I did not modify anything other than trying to save my entries to that default notebook and that did not even work. Copying the default notebook to another notebook also did not work for me in the customized browser.

Anyways, thank you both (@TMosh and @rmwkwok) for feedbacks. I look forward to learning more from the both of you.

1 Like

Hey @EJ_Romero,

Thanks for letting us know how you solved it. I am going to refer another learner to your experience. For this kind of problem it is always difficult for us to make suggestion because we can’t check anything on our end - not your coursera account, not coursera computation resources, not your device, but I am very happy to see that you can move on :).

Congratulations on finishing the first course, and I hope you will enjoy the next one!