C5_W2_Emoji_v3a_E5 pass all the tests but grading 0

Cell #25. Can’t compile the student’s code. Error: IndexError(‘index 3 is out of bounds for axis 0 with size 2’,)

2 Likes

Typically this means your code is using some hard-coded value that is not correct for the data set the grader uses for testing your code.

I recommend you take a long look at your code, and see if it is using any constant values in places that there is a variable available.

2 Likes

Hi, I’ve look through my codes and there’s no hard-coded value, and the common issues don’t exist(like using the any_word, the second for loop using ‘if’… Would you mind checking some codes of my lab? I would appreciate it.

1 Like

What is in Cell #25?

1 Like

may I post my codes here? btw, is ‘Cell #25’ means that the 25th Cell ?

1 Like

Sharing your code is not allowed. Please check what is in 25th cell and if it has no any code written by you, then share screenshot here.

1 Like

Here are screenshots. thanks
ps: this is in Exercise 2, the grading error is at Exercise 5

1 Like

This is cell # 12.

And as I mentioned earlier, sharing your code is not allowed.

1 Like

I just checked my notebook. This is cell # 25:

So, it is testing your code for pretrained_embedding_layer function. Please check that code again and see if you miss something.

1 Like

What error you are getting in the Notebook?

1 Like

OK,thanks for your reminding, I’ve already deleted my codes.
This is my Cell #25, I edited it to see weights and forgot it. Sorry for my carelessness. Thank you again, I appreciate you.
image

1 Like

I am getting a similar error like a few folks here. I tried some of the ideas mentioned above but still not able to get it to work:

Cell #14. Can’t compile the student’s code. Error: KeyError(‘never’,)

any help would be appreciated.

This means you’re using a hard-coded dictionary key, which the grader does not recognize.