I finished UNQ_C2 , but when come to the # UNIT TEST, it is running without stopping !!
Did you add some cells or otherwise go beyond the notebook’s instructions?
Did you add print() statements that output a lot of data to the console?
If you have not fixed this problem, then submitting your notebook for grading will cause the grader to crash.
If your notebook image becomes too large (full of debugging information), then grader will not be able to process it.
Thanks for your email, I don’t meet any point as you described. “All tests passed!” but my Grading failed
“All tests passed” does not mean your code is perfect. The tests in the notebook only check for some common and simple errors.
I tried again, but this time, cell [17] with the function “insert_audio_clip_test(target)” wouldn’t stop running. I had to stop it, but I was able to complete the rest of the exercise, and everything passed. However, when I submitted the assignment, I received a grading error.
Hi @Ru_WANG ,
As you have only included part of the error output, it does not help in giving a precise diagnosis. If you have managed to pass the unit test, then, it suggests that you might be using some hard-code values in your function. The auto grader tested your code with a different set of values.
I suggest you start debugging your code and check if there is any hard-code value used.
Thank you for your reply. I’ve attached the complete error output. Since cell 17 wouldn’t stop running, I had to manually stop it, which resulted in the “KeyboardInterrupt” error message, as you can see. I followed the steps to write my insert_audio_clip_test
in cell16, but the issue seems to be with this specific cell17, which is for the unite test and uneditable.
Also, is there a way to get the original, unmodified notebook? I’m unable to distinguish between the original code and the changes I’ve made.
Yes, you can get a fresh copy as described here, which is also linked from the DLS FAQ Thread. If that is new to you, the FAQ is worth a look to see what else is covered there.
Note that you don’t really know if the tests pass in the notebook, because it did not complete, right? So it’s possible that there is a bug in your code, e.g. an infinite loop. But another possibility is that the server you are assigned to is overloaded. You could try logging out of Coursera and back in again and then trying everything again. No guarantee that will help, of course, but it’s an easy experiment to try.
I suspect the issue may be that you have deleted the loop counter code that prevents this function from running forever. Code for that was included in the notebook.
Thanks! I have done reboot to get new notebook.
Yes, you are right! it is due to the delected the loop counter ! Thanks very much. After a lot of effort and strunging, I finally get it.