Course 4 - Week 2 Assigment 2 - Submission Error 0%


I finished the second assignment of week 2, all outputs were correct, all tests were passed, but I submitted it twice and got 0%! Has that happened to someone?


1 Like

Hi @Cedopedo ,

Can you share your lab ID with me ? In the assignment, when you click the top right “Help” button, a panel will open and your lab ID will be shown at the bottom.


Here is the lad ID : krympxqz


I have the same issue: Cell #3. Can’t compile the student’s code. Error: TypeError("‘int’ object is not subscriptable",)

Hi @111125,

Can you share your lab ID with me ?


Hello, I have the same issue. My lab Id is hlcauxmw

Hi @sawantk, can you share the output which the autograder gives ? Thanks.

And also make sure that no other cells except the exercise cells were changed before submitting.

I get the following grader output : Cell #3. Can’t compile the student’s code. Error: TypeError("‘int’ object is not subscriptable",)

Hi @sawantk,

Fetch a new version of the assignment and try submitting that. If you still get this error, let me know.


Even after fetching a new version, I get the same output. The new notebook ID : daxermad

Thanks for letting me know @sawantk. Let me take a look.

Hi @sawantk,

I believe you added an extra cell in the notebook (it is not part of the original assignment version). It is cell # 3, word_to_vec_map["father"]. That is the issue.

We ask our learners to refrain from adding extra code cells or changing the code in the assignment because this fails the autograder. The autograder has a similar version of the assignment which it tests against the version you submit. And it fails when it finds a mismatch, which is your case, is the extra added cell. Remove it and you should be good to go.

We ask the learners to first submit the assignment, get it graded and then feel free to explore the assignment however way they like. And as a suggestion, we recommend them to keep a track of the original code as well, so they know what changed.

Let me know if this helps. Otherwise I’ll explore further.


Thank you for the help. I forgot I added a new cell. I thought fetching a new notebook will clear these issues.


Hi @sawantk,

Hmm, it should have had. I’ll check with Coursera about this. Thank you for letting me know.

Happy learning,

Hey Mubsi, the problem still isn’t resolved… Could you please check my lab id (krympxqz) and see what’s wrong? I really don’t get it

The first thing to check is if you added any cells to the notebook. That can cause the grader to crash.

The second thing to check is if you changed the file name of the notebook.

Thanks a lot, it worked this time

Did you have to make any changes to get it to work?

If I remember correctly, I first had to delete the added cells, but I think that wasn’t enough, I also had to restart and run the kernel without the deleted cell before submitting.

Maybe I’m wrong and restarting the kernel has nothing to do with it, I just forgot to delete a cell.