Course5 Week2 Assignment2 -Emoji_v3a submission error : Cell #21. Can't compile the student's code. Error: AssertionError('Wrong values. Debug with the given examples',)

Has anyone figure out the issue? My implementation looks correct and tests are passing in dry run before submission. After submission, it is consistently giving follwing error “Cell #21. Can’t compile the student’s code. Error: AssertionError(‘Wrong values. Debug with the given examples’,)” .I am not sure, error message is citing with examples to use for debug. The examples in the notebook are already working fine.

The grader uses different tests.

Passing the tests built into the notebook is not sufficient to prove your code is perfect.

As Tom points out, just passing one set of tests is not a guarantee of success. In this scenario there are two overall possibilities:

  1. Your code is not general, meaning it passes the tests in the notebook, but fails the different tests that the grader uses. Ways this could happen would be referencing global variables from within the body of your functions or hard-coding the dimensions of objects.
  2. There is something structural wrong with your notebook that interferes with the grader’s operation. Modifying things outside the “YOUR CODE HERE” sections can cause this. Or uploading an old notebook from github or the like.

If you have thought hard about option 1) and haven’t come up with anything yet, it would be worth getting a clean notebook (using this thread) and then carefully copy/pasting just your solution code over to the “YOUR CODE HERE” sections and then submitting again and seeing if that helps.

If neither of the above work, then let us know and there are yet other ways to proceed.

1 Like

Super thankful for your suggestion. Starting with a new clean notebook, I figured out that I had changed a variable name to be more appropriate and it messed up the things. Because , updated name was clashing with another global variable name.

3 Likes

That’s great news that you were able to get to a solution based on those suggestions! Thanks for confirming.