My programming assignment passes all the intermediate tests, and is able to run and train the GAN with an output that makes sense, yet when I submit the notebook it receives a score of 0/10 with only the following explanation for the grader output:
" Sorry, your submission was incorrect. Please try again. Expecting value: line 1 column 1 (char 0)"
I didn’t see this exact error in this course thread, but saw similar errors for threads in other courses, and those suggested that just re-submitting the exercise a second time was helpful in fixing the problem, yet that has not worked for me.
Any advice on understanding the error or the scoring problems would be appreciated!
(fyi, my submission for the following week 2 exercise had no issues, when I used all the same methodologies, and I’ve never encountered this error in my many other DeepLearning.ai submissions).
That error sounds like there is something structurally wrong or corrupted about your notebook. Are you sure that you didn’t work on it with any tools other than the course website?
Regardless of how the error was generated, my suggestion of the best thing to try would be to get a clean copy of the notebook using the first topic on the DLS FAQ Thread. Then very carefully “copy/paste” over just your solution code from the “YOUR CODE HERE” sections and then try to submit again (after checking that all the local tests still pass, of course).
Please try that and then let us know if that helped or not.
Yes, I saw the thread on getting a clean copy of a notebook. I did precisely that, and it still throws the same error. I never used any tools other than the course website either.
Fwiw, the assignment for C1W2 submitted perfectly fine the first time (worked on it the same way). But the assignment for C1W3 is throwing the same error as this one.
Any suggestions you have would be great, as it continues to be extremely frustrating. Thank you!
Hi Chenrynyc!
If you still face the issue even after following Paul’s suggestions and the instructions in that thread (assuming that you have not removed any comments in the notebook or added extra cells) then kindly share your notebook through private chat, and I will have a look into it to have a clear picture on the issue.
Are you using any unusual browser settings for language or keyboard or character sets or the like? The message sounds like the grader is not recognizing some character. If the exact same error happens also in C1W3, that would indicate a general problem of some sort that is somehow specific to you, so that’s what triggers that thought about browser settings.
But Nithin’s suggestion is the real way to get to a definitive answer here. If I had a copy of one of your ipynb files, my first step would be to look at it on linux or MacOS as a file and use “diff” to compare it to a clean copy of the same notebook and see if anything pops out. The ipynb files are in JSON format with a bunch of metadata structure to express everything.
No unusual browser settings, and it worked find for C1W2 without issue (as with past courses).
I sent the notebook to Nithin to see if anything jumps out.
The only other oddity I’ve encountered is in trying to refresh the notebook, the ‘delete’ notebook option fails with the error listed below.
So instead, to get a new fresh notebook, I simply renamed the old one, and created a new subdirectory to move it into, and then Update Lab created a new fresh blank notebook, which I re-entered my code into. But the submission problem remained.
Thank you both for your help!
here is the error in trying to delete the notebook:
“Delete Failed
An error occurred while deleting “C1W1_Your_First_GAN.ipynb”.
Traceback (most recent call last): File “/usr/local/lib/python3.8/dist-packages/send2trash/plat_gio.py”, line 17, in send2trash f.trash(cancellable=None) gi.repository.GLib.GError: g-io-error-quark: Unable to find or create trash directory for /tf/C1W1_Your_First_GAN.ipynb (0) During handling of the above exception, another exception occurred: Traceback (most recent call last): File “/usr/local/lib/python3.8/dist-packages/tornado/web.py”, line 1704, in _execute result = await result File “/usr/local/lib/python3.8/dist-packages/tornado/gen.py”, line 234, in wrapper yielded = ctx_run(next, result) File “/usr/local/lib/python3.8/dist-packages/notebook/services/contents/handlers.py”, line 239, in delete yield maybe_future(cm.delete(path)) File “/usr/local/lib/python3.8/dist-packages/notebook/services/contents/manager.py”, line 279, in delete self.delete_file(path) File “/usr/local/lib/python3.8/dist-packages/notebook/services/contents/filemanager.py”, line 531, in delete_file send2trash(os_path) File “/usr/local/lib/python3.8/dist-packages/send2trash/plat_gio.py”, line 23, in send2trash raise OSError(e.message) OSError: Unable to find or create trash directory for /tf/C1W1_Your_First_GAN.ipynb”
In sending the notebook to Nithin, I saw the notebook size was large (>30MB), I assume because I ran the last training cell and saved it after that, which shows all the outputs of the generated images and training steps.
Wondering if somehow that might be a problem, I just refreshed the notebook to a new one, put in code, but only executed all cells except the last one that trains the model before saving. (so of course the file size is then small).
And that submission was graded very quickly and got 100%, as I expected.
Are we not supposed to execute the last training step before submitting the notebook? I didn’t see any instructions to that end, but am wondering if that fact explains all my issues?
Ah, that’s a good point. The grader does not need any of the output in the notebook, so the recommended methodology is to do “Kernel → Restart and Clear Output”, “Save” and then “Submit”. That minimizes the memory size that is submitted to the grader. Of course this is not explained anywhere, but is learned through experience. I should add something about this in the FAQ Thread.
This solved the issue, both on the W1 and W3 notebooks.
I’ve restarted the kernel on prior lessons, but didn’t think to clear the output on a notebook that passed all tests from the start.
@chenrynyc, nice job debugging this! Sorry you had to go through all that!
Just to follow up on the error you saw when trying to delete a notebook - another student noticed that just last week. I reported it to staff, but will give them a ping to remind them to take a look at it. Your work-around to rename was perfect (and I actually think nicer than deleting since it leaves your old version easily accessible for copy/paste into the new version).