Please, don’t get out of this problem:
I don’t understand where I’m wrong.
Try running all of the previous cells in the notebook. That’s where “word_to_vec_map” is first defined.
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.
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.