Week2 - sentence_to_avg - Emojify_v3a key error

Please, don’t get out of this problem:


I don’t understand where I’m wrong.


1 Like

Try running all of the previous cells in the notebook. That’s where “word_to_vec_map” is first defined.

I have restarted and Cleared the Output, but the error remains the same as before.

It looks like somewhere in your code, after the “cucumber” test but before the sentence_to_avg_test(), your code has modified the data that is stored in the word_to_vec_map variable, so that it no longer a valid word map.

Hi TMosh,
I solved the problem by resetting the notebook and starting from scratch!
as an exercise to view some values I had inserted some additional cells I suspect that the problem could derive from there.

Adding cells usually causes problems.

1 Like