C5W1A1 Ex1- works in browser but not submissions

I’m having issues with the first exercise. I ran it through the browser and it said all tests pass. But when I submit the assignment it fails with the message

Cell #3. Can’t compile the student’s code. Error: TypeError(“‘NoneType’ object is not subscriptable”)

I’ve completed all the other exercises and they worked in browser. What could be wrong?

I’ve tried running “shutdown” and reloading but now get

Cell #5. Can’t compile the student’s code. Error: TypeError(‘cannot unpack non-iterable NoneType object’)

Any advise is appreciated.

UPDATE: I downloaded the assignment code again, manually typed in the same code I had originally, and now the submission scored 100%. I don’t understand why it gave me these errors in the first place.

During coding, we sometimes touch some cells for debugging. We do not know which is the case, but, the AutoGrader is not very flexible if we look at the note written in all assignments.

Before submitting your assignment to the AutoGrader, please make sure you are not doing the following:

  1. You have not added any extra print statement(s) in the assignment.
  2. You have not added any extra code cell(s) in the assignment.
  3. You have not changed any of the function parameters.
  4. You are not using any global variables inside your graded exercises. Unless specifically instructed to do so, please refrain from it and use the local variables instead.
  5. You are not changing the assignment code where it is not required, like creating extra variables.

In this sense, retyping the same code into a fresh notebook may be the one of the ways to remove unnecessary cells/code. :slight_smile:

Thanks for your reply Nobu,
I don’t believe I did any of those. I did make a copy, put the code in the copy and submitted that. Maybe the marker expects the original name?
Anyway, downloading a new file and typing the code into that worked (no renaming this time).