Cell #8. Can't compile the student's code. Error: KeyError('intelligence',)

Hello,

I’m having an issue when grading the week 2 program assignment “Emojify!” I have reviewed all the for loops and the if within them, and they seems to be ok. All the tests are passed when exectuting the notebook. I have also restarted the kernel and I have run all the cells again, reviewed the outputs and all the test are passed, the accuracy of the test set in LSTM network seems to be good. When submitting the assignment my code don’t pass the grader, and the following message appears:

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

Could someone can help on this topic I need some tips to continue, right now I’m completely lost.

Kind regards,

Sorry, I don’t have any other tips for this issue.

I have commented the code in cell #8 and everything is fine. So I close the topic.

Hi @jupe2009,

The KeyError happens most likely in key/value mapping cases, such as a dictionary type of data structure. The error is throw as no mapping can be found for the key ‘intelligence’.

You may need to clear all output, refresh the kernel and rerun all the cells.