# C5\_W2\_Emojify\_V3a

**URL:** <https://community.deeplearning.ai/t/c5-w2-emojify-v3a/277119>\
**Category:** Sequence Models\
**Tags:** coursera-platform\
**Created:** [February 19, 2023, 11:13pm UTC](https://community.deeplearning.ai/t/c5-w2-emojify-v3a/277119 "2023-02-19T23:13:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Barakat](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/barakat/32/32877_2.png) [@Barakat](https://community.deeplearning.ai/u/Barakat)\
**Post date:** [February 19, 2023, 11:13pm UTC](https://community.deeplearning.ai/t/c5-w2-emojify-v3a/277119/1 "2023-02-19T23:13:17Z")

</div>

I’m getting this from the grader output  
Cell #13. Can’t compile the student’s code. Error: KeyError(‘never’,)

however all tests passed within the notebook  
and this is Cell13

 ![image](https://global.discourse-cdn.com/dlai/original/3X/f/8/f8a22caf28ead223dde8881e415d31b3e379679f.png)

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [February 19, 2023, 11:15pm UTC](https://community.deeplearning.ai/t/c5-w2-emojify-v3a/277119/2 "2023-02-19T23:15:38Z")

</div>

I believe you’re using an incorrect word to initialize the size of the avg variable.

If I recall correctly the hint tells you to use the variable “any\_word”, that’s why they provided it in the notebook.

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [February 19, 2023, 11:16pm UTC](https://community.deeplearning.ai/t/c5-w2-emojify-v3a/277119/3 "2023-02-19T23:16:30Z")

</div>

The grader uses a different set of test data, and it doesn’t include the “never”.

---

<div class="post-metadata">

**Author:** ![Barakat](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/barakat/32/32877_2.png) [@Barakat](https://community.deeplearning.ai/u/Barakat)\
**Post date:** [February 19, 2023, 11:21pm UTC](https://community.deeplearning.ai/t/c5-w2-emojify-v3a/277119/4 "2023-02-19T23:21:42Z")

</div>

I’m already using “any\_word”

 ![image](https://global.discourse-cdn.com/dlai/original/3X/8/4/84d770379c7fc565d089da5c24979c4313aae0dd.png)

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [February 20, 2023, 4:16am UTC](https://community.deeplearning.ai/t/c5-w2-emojify-v3a/277119/5 "2023-02-20T04:16:09Z")

</div>

At first glance, that looks fine. Did you perhaps rename the notebook file?  
The grader doesn’t like that.

Also, please don’t post your code on the forum unless a mentor asks to see it. That’s not allowed by the community standard.

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [February 20, 2023, 5:41am UTC](https://community.deeplearning.ai/t/c5-w2-emojify-v3a/277119/6 "2023-02-20T05:41:29Z")

</div>

You might find this thread useful.

> [@Cell #13. Can't compile the student's code. Error: KeyError('never',)](https://community.deeplearning.ai/t/cell-13-cant-compile-the-students-code-error-keyerror-never/134899/4):
>
> I recommend you: Look at your code in the sentences\_to\_indices() function. Look at your model() function, and see if you are calling sentence\_to\_avg() correctly. When you get a key error, it means somewhere you’re using a specific word from the notebook, which makes the grader break (because it uses a different set of data).
