[Solved] C5W3A2 Trigger Word Detection Grader Submission Error: "Cell #24. Can't compile the student's code. Error: FileNotFoundError(2, 'No such file or directory')"

I finally managed to solve this issue and I have seen a lot of people struggle with it so I decided to post the solution here.

The trouble in cell #24 comes from the create_training_example function called which we created in cell #22.

The second-last line of the function is :
# Export new training example
file_handle = background.export("train" + ".wav", format="wav")

Make sure this line is not commented out! For some reason it was commented in my cell even though I do not remember commenting it. Maybe it is how it is loaded from the beginning. This line exports the file as train.wav and when commented, the grader fails to find it because it was never exported.

Do not forget to restart kernel and save before submitting!

Hope it helps :slight_smile:

1 Like

Thanks for posting this.

I also noticed this trend recently, and it’s discussed in another thread. I have checked that the published notebook does NOT have this line commented-out.