C 5_W 2_ A 2_Submission Error

It seems that I made no mistakes in this Assignment. The error is in Ex3. Please help me soon.
Thank you

Hi @khoa.nguyen311202 ,

I have technical problem in logging in to the Coursera platform, so I have no access to the course material at present.
However, looking at what you posted here, my suggestion is to refresh the kernel and clear all output, rerun the code from start.
The KeyError is showing no match for the key word ‘funny’ can be found.

Hi @Kic, thanks for your reply
I did what you suggested but the error still occurs. And is it strange that the KeyError is in Ex3 but the grader says it’s in Ex5?

Hi @khoa.nguyen311202 ,

As I mentioned I have no access to the course materials, so I am limited in what to help. I hope the technical problem with Coursera will be sorted out soon.

May be worth trying to refresh the kernel and clear all output, rerun code to ex3 and gradually running the code cell further down to see what happens.

I believe I have the similar issue as you. The part one is fine; but part 2 unit test can’t run at all. I reloaded the whole thing, the issue is still there.

I just found a post about this. However, I’m still unsure what to do

Hi @khoa.nguyen311202
& @swe

After reading that post on the KeyError(‘funny’), it suggests to check your code and make sure your implementation is correct. There is an ‘if’ statement in the code block, skipping it or implemented incorrectly would cause the error.

this is the error I am getting
Cell #14. Can’t compile the student’s code. Error: ValueError('operands could not be broadcast together with shapes (5,2) (5,) ',)

help please

Hi @Ebukliq ,

Could you give me the function name of that section of your code, cell number is not reliable to locate that section of the code as your copy of the notebook could be different from mine.

hi, I do not know the actual function. It all runs showing all test passed.
I get that error when i try to submit

Hi, @Ebukliq ,

Could you post the submission summary here. The summary would show which part of your code failed to get any marks.

We have no access to your notebook, nor your account.

this is the grader output:
Cell #14. Can’t compile the student’s code. Error: ValueError('operands could not be broadcast together with shapes (5,2) (5,) ',)

Hi @Ebukliq ,

Just giving me the cell number really doesn’t help, as i have explained to you earlier.

I have no access to the assignment due to technical problem with the Coursera platform. So, I am afraid I can’t offer any help. Could you create a new post with as much information as possible so that other mentors may be able to help.


I tried it all. Tried to refresh the kernel, clear all output and rerun the code. Din’t work. Tried also gradually running the code after restarting the kernel and clearing outputs.None of them is working.
Showing the error as below always:
Cell #14. Can’t compile the student’s code. Error: ValueError(‘shapes (5,2) and (50,) not aligned: 2 (dim 1) != 50 (dim 0)’,)

Hi @Ebukliq @Farija ,
I change my code in Exercise 1 - sentence_to_avg
avg = np.zeros(np.shape(word_to_vec_map))
avg = np.zeros(word_to_vec_map[any_word].shape)

and It passed the assignment.

1 Like

Hi @coco ,

Yes. I tried that and it worked. Thank you for the suggestion!

1 Like

Thanx. It helped me.

thanks. this helped me.

I got exactly the same error due to a small error in scored function sentences_to_indices. So I suggest do check this function.

For me, here’s my typo and what I changed:

I changed from if w in sentence_words: to if w in word_to_index:.

Yes, you are right Yufeng Deng.