Transfer_learning_with_MobileNet_v1 - Cell10

I encountered below error when submitting my assignment:
Cell #10. Can’t compile the student’s code. Error: Syntax Error(‘EOL while scanning string literal’, (‘/tmp/studyent_solution_cells/’, 12, 29, “IMG_SHAPE=IMG_SIZE + (3, )\n”)).

I am very frustrated as all the tests have been passed and I have never changed anything else.

1 Like

Hello francis,

Did you try restarting your kernel and then running all the cells one by one?
Also check if you got any error, or any output mismatch from the expected output while running each cell.

You can send the screenshot of Cell#10 via personal DM if you are still having the issue. Click on my name and then message.


1 Like

Hi, Francis.

That cell is just given to you as part of the notebook template and should not need to be changed. If it works in the notebook, but throws that error only in the grader, there must be some corruption in that cell. E.g. some kind of non-printing character has been inserted that causes the line not to read correctly in the grader’s context. Here’s what the text looks like for that cell in my notebook:

base_model = tf.keras.applications.MobileNetV2(input_shape=IMG_SHAPE,

You might try deleting the contents of that cell and then “copy/pasting” the text I show above into that cell and see if that helps or not. Or maybe the safer way would be to get a clean copy of the notebook and copy/paste your code to that fresh copy. Here’s a thread about how to do that, but of course it’s more work than just copy/pasting the text I show.

Other problems I can theorize might cause this would be if you have unusual language settings in your browser. If you’re not using Chrome, try it with Chrome and with normal English settings and see if that makes a difference.

1 Like

One of the ways this sort of issue can happen is:

  • If you downloaded the notebook, worked on it using some other platform, then uploaded the notebook into Coursera Labs for grading.
1 Like

Thanks everyone for your kind help and suggestion! I reviewed my notebook again, and found I may have added extra space to some cells in the section which I should not update. The problem is resolved and I am able to submit my assignment and get the grade. Thank you!!!

That’s great news! Thanks for confirming.