Compiling error

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

hey guys can someone help me on how to deal with this issue??

Hi @Frans_mphodisa ,

KeyError usually means that the key you are looking for is not found in the dictionary. So check your code. I have not work on your assignment, so I can not specifically offer comment on which part of your code that you need to check.

Searching on your error message can help you find threads where people have resolved similar problems. Here is an example that might be of interest…

This is the Naive Bayes assignment NLP C1 W2. Note that the keys to the freqs dictionary are not just words: they are a tuple of (word, sentiment), right?

If you’re sure that everything runs smoothly in the notebook and you only see this error from the grader, then the thing to look for would be any kind of “hard-coding” to match the test cases in the notebook.

If none of the above hints are enough to get you to a solution, please let us know and we can try more radical solutions. :nerd_face: