How to solve the error when my all the code test are passed, but when I submit, in the grade section it throws error.

I have enrolled in Deep Learning course by Andrew Ng. In Convolutional Neural Network course in week 2. I have passed all the tests in the lab notebook but when I submit it, in the grade section it gives an error and I am unable to submit it. In the grader output it shows error:

Cell [#UNQ_C2](javascript:void(0);). Can’t compile the student’s code. Error: SyntaxError(“unmatched ‘)’”, (‘/tmp/student_solution_cells/cell_16.py’, 40, 5, ’ )'))

Traceback (most recent call last):

File “/home/www/app/grading/exceptions.py”, line 112, in handle_solution_errors

yield {}

File “/home/www/app/grading/abstract.py”, line 393, in _grade

context = compiled_code.run(cell_index=cell.index)

File “/home/www/app/grading/submission/compiled_code.py”, line 195, in run

return list(self._code_items.values())[cell_num - 1].run()

File “/home/www/app/grading/submission/compiled_code.py”, line 54, in run

return import_module(self.import_statement, items)

File “/usr/local/lib/python3.8/importlib/init.py”, line 127, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

File “”, line 1014, in _gcd_import

File “”, line 991, in _find_and_load

File “”, line 975, in _find_and_load_unlocked

File “”, line 671, in _load_unlocked

File “”, line 839, in exec_module

File “”, line 976, in get_code

File “”, line 906, in source_to_code

File “”, line 219, in _call_with_frames_removed

File “/tmp/student_solution_cells/cell_16.py”, line 40

)

^

SyntaxError: unmatched ‘)’

But there is no parenthesis error in the code. And even while running the code it isn’t throwing any error.

Hi @Garv.it

Please take a look at these similar posts:

If your problem remains unsolved, you can share your notebook with me, so we can look for possible issues together!

Hope it helps!

Something in your notebook has broken the grader. Likely it has been modified in an unintended manner. For example, using a different platform to modify the notebook, deleting or adding cells, modifying the notebook metadata, etc.

I recommend you delete your notebook and get a fresh copy and start over. That’s the simplest way to proceed. Debugging grader issues is very difficult.