The notebook you provided has a syntax error that prevents it from compiling

Does someone know how to fix it?


@a-zarta @juandevprojects @andres.castillo @SantiagoH
Any idea who can help with this issue, please?
I encounter this on C4_W1_Assignment and C4_W2_Assignment.

I get this error even when I submit the assignment skeleton, without any change from my side.
I’ve tried Restart & RunAll. Doesn’t fix it!

Sometimes this happens when you add a cell with your own code, which is not accepted by the grader. In that case, you need to start with a fresh version of the assignment. You can see how to do this here.

Where does it say that the notebook template is guaranteed to compile cleanly with no changes? You have simply made an incorrect assumption. Sometimes they put “None” to indicate a placeholder that you need to fill in and that results in bad syntax. It is your job to find and fix all those instances.

I like to submit often (even after just doing 1 ex) to see grader output. Is this expected?

I also like to use the “incremental grading” approach to test my functions as I go, but not all the notebooks are set up to allow that. In some cases, there is incomplete syntax in the function cells where you need to write code and you just get a syntax error when you submit. Sorry, but in those cases, you’ll need to remedy the syntax errors before you can get any useful feedback from the grader.

I tried this with a fresh version of Assignment1 - C4 Week 1. And even with a fresh notebook, to which I made no changes, I still got this error. I refreshed my notebook by following the instructions given by:

H​ow to Refresh your Workspace:

O​ption 1 - Using Lab Help

  1. O​pen the assignment.
  2. After the assignment opens up, c​lick "File" (top left) and then "Open…"
  3. W​hen your workspace opens, select the check box before your assignment file. After it is selected, press "Shutdown".
  4. U​sing the same procedure mentioned above, "Rename" your file. For instance you can change it from assignment_name.ipynb to assignment_name_v2.ipynb. By doing this you’ll be able to save your current progress on the assignment after the latest assignment file is fetched.
  5. Using the same procedure, "Delete" any other file, if any, that you want to get a fresh copy of.
  6. After renaming your file, click on the "Help" button on the top right of the page. From the panel that opens, click "Get latest version" button, and then "Update lab".
  7. A​fter the page reloads go to File → Open… , as described in (2)
  8. Now you’ll see two notebook files. The one you renamed (as done in step 4) will have your previous progress, and the latest version. (Depending on how many previous versions you have kept saved, you could have more than two assignment files in the worksapce)

What should I do at this point?

I’m not sure I understand your question. Are you saying that a clean version of the notebook does not submit cleanly to the grader? If that’s your point, please read my earlier replies on this thread. There is no guarantee that will work. It just depends on the particulars of the notebook. If you get a syntax error, your job is to find and fix it.

OK - My error. I need to fully complete the project before submitting.

Right! As was discussed earlier on this thread, it would be cool if you could use the grader to do incremental testing of your code one layer at a time. In a perfect world … But we have to live with the world as it is, not as we wish it to be. :smiley: