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.

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.

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

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.

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.

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

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.