Trigger_word_detection_v2a unknown grader error

  • Link to the classroom item: Coursera | Online Courses & Credentials From Top Educators. Join for Free | Coursera

  • Description: The grader keeps giving strange errors and marks my submission as 0. I did pass all the tests given inside the notebook. Besides, my model worked fine on the development set. I did try to restart the kernel, fetch a new notebook and everything I could but the problem still persisted!
    Could anybody kindly take a look and help me find out the reason? Thank you for your time!

1 Like

We cannot directly see your notebooks. That syndrome means that there is something about your code that is not general. The things to look for would be referencing global variables from the body of functions or hard-coding assumptions about dimensions or the like.

1 Like

Please post a screen capture image that shows the grader feedback in detail.

1 Like


The complete feedback (first line) is:


Cell #UNQ_C5. Can't compile the student's code. Error: SyntaxError('invalid syntax', ('/tmp/student_solution_cells/cell_33.py', 83, 9, '    X = \n'))

The feedback below (second line) was before I fetched a new notebook.

Thank your for your time!

1 Like

Thank for your suggestion!
However, I did check all my code and could not find the mistakes of the kind.

1 Like

Did you perhaps copy any of the “hint” code from the notebook and use it in your code for the functions?

There are formatting errors in the hint code, which the notebook kernel ignores, but cause the grader to crash.

The identifier for this issue is if any of your code text uses a red font.

2 Likes

Ok, please check your DMs for a message from me about how to take the next step here.

My theory is the same as Tom just described. I think that the notebook environment is a bit more forgiving than the grader environment about some syntax things, e.g. mixing spaces and tabs in indentation.

1 Like

Hey you’re right! I rewrote the code myself and it worked perfectly now! Thank you for your time and support!
Best regards,
Kim

3 Likes

Good afternoon everyone,

I am having same error about compiling error:
Cell #25. Can’t compile the student’s code. Error: FileNotFoundError(2, ‘No such file or directory’)

I cannot find they way to make it works. Any tip?

Thanks in advance!

Is there code in the 25th cell of the notebook that reads in a data file?
If so, did you add that code, or was it provided?

1 Like

Also note that the cell numbers are dynamic, meaning that they change if you rerun any of the cells. To get a consistent numbering, try this:

Kernel → Restart and Clear Output
Cell → Run All

Then page through and look at the numbers by the cells like this example to find cell #25:

1 Like

Good morning Paul,

Thanks for your reply. I attached where the problem is, I cannot see how to solve the problem.
I have been rechecking the code many times but I am not able to get the right answer.

Can you help me with this? Thanks in advance!

{moderator edit - solution code removed}

Note that you commented out the line that actually exports the file. That is the line that starts:

file_handle = background.export ...

That was given to you in the template code and there should have been no need to change it. Why did you do that?

Noted and changed!. Now it works smoothly.
It was just a type mistake I did unwittingly.

2 Likes