C1W3_Final graded lab_I have passed all tests and earned everywhere "You have passed", but in the end I cannot earn a grade

My error is: Cell #1. Can’t compile the student’s code. Error: SyntaxError(‘invalid syntax’, (‘/tmp/student_solution_cells/cell_1.py’, 6, 7, ‘In this exercise, you will implement logistic regression and apply it to two different datasets. \n’))

Why is this Jupiter does not show me any errors!

Check your notebook, and see if you have any line breaks in your code that cause fragments of code to be isolated on a separate line.

The grader acts by copying your code into another template, and it doesn’t do a good job handling lines that have isolated code elements.

So that’s one thing you can check. It might be anywhere in your code, the cell numbers in the grader feedback refer to the grader template, not to the cells in your notebook,.

One other theory would be that sometimes the generated output from running the notebook can produce syntax that confuses the grader. The grader does not need to see your generated output: it just needs to call your functions. So it’s worth trying to clear your output and then submit, e.g. by this sequence:

Kernel -> Restart and Clear Output
Save
Submit

Of course there’s no guarantee this will help, but it’s an easy experiment to try. This also makes the submission process as efficient as possible by minimizing the amount of data that gets uploaded to the grader, so it’s a reasonable way to submit in any case.

1 Like

Another thing to try - the error you’re seeing looks like the grader is trying to treat the first cell of instructions as if it were code. Make sure you have not accidentally marked the first cell as ‘Code’ instead of ‘Markdown’

3 Likes