Coursera Grading Error

Receiving the below error

All my unit test cases have passed but still receiving the below error.
There was a problem grading your submission. Check stderr for more details.

Kindly help as how can I see stderr.

1 Like

Hi @Komal_Khetlani

Most probably you have a global variable or one of the other problems in your notebook. Please check for them carefully.

Before submitting your assignment to the AutoGrader, please make sure you are not doing the following:

  1. You have not added any extra print statement(s) in the assignment.
  2. You have not added any extra code cell(s) in the assignment.
  3. You have not changed any of the function parameters.
  4. You are not using any global variables inside your graded exercises. Unless specifically instructed to do so, please refrain from it and use the local variables instead.
  5. You are not changing the assignment code where it is not required, like creating extra variables.
1 Like

I am also facing the same issue. I am following all the instructions, but still not able to pass the assignment.

1 Like

Maybe it’s time to look at your code. We can’t do that on a public thread, but there is a way. Please check your DMs for a message from me.

1 Like

You are making the most common error on this assignment: you are referencing the global variable word_embeddings in the local scope of the get_country function. You should be referencing the actual formal parameter of the function which is the variable embeddings. Your code works in the notebook, because that happens to be the variable that gets passed as the embeddings argument. But it’s a bug, which you see because the grader passes a different embeddings dictionary and it fails.

Then the get_accuracy function also fails in the grader because it calls get_country.

2 Likes

I am too getting this error, But I am bit frustated with this and need a solution for this dude.

1 Like

Did you read my previous response on this thread? Are you getting the grader failure on get_country and get_accuracy? If so, it’s probably the same thing I explained here.

1 Like

hello, i tried following what you mentioned here, but i still seem to get the same error. i switched all the variables in the get_country function from word_embeddings to embeddings, but it still made no difference while i was submitting the code.
please help

1 Like

Are you sure you really got all of them? Don’t just rely on your eyes: use the browser search (^F). Are you sure you did “Save” before you clicked “Submit”?

1 Like

Did you perhaps make a copy of your notebook under a different file name?

2 Likes

yes i did. but i also figured where the mistake was. i was only supposed to be changing the variables in the get_country function from word_embeddings to embeddings. i also changed the variable in the next chunk of code too to “embeddings” and that is why it was giving me the error. anyways, thanks for this post

3 Likes

oh no, thats not what happened. though would that change anything?

1 Like

It would impact your ability to have your notebook graded. You cannot grade a notebook that has an unexpected file name.

1 Like