C4_W3_Assignment (Question Answering)

Did all assignments. All unit tests pass. Getting strange error “The notebook you provided has a syntax error that prevents it from compiling.” and zero points in all assignments. No further explanation is given.

Refreshed notebook and carefully solved all assignments again, same result. Was not able to find any useful hints on forums. Please advice what to do next.

Hi @serh2i

This error message indicates that the grader cannot run all the cells in your notebook without receiving an error.

Make sure that every single cell in your notebook executes without an error - try executing every cell and see if it does not produce an error. Also make sure that you did not add or removed the code outside `### START CODE HERE … END CODE HERE ###


Thank you. I did all you’ve suggested, but it didn’t help.

But I was able to pass finally and found that issue was in this line of code:

prev_no_mask = !prev_no_mask

See, I wrote “!” instead of “not” out of habit.
Code compiles, runs in notebook, all tests pass. But grader fails with rather misleading message.

Ah, I see, an unusual case :slight_smile:. Thanks for sharing!