C1W1 Assignment error

Please, i submitted my C1W1 Assignment but was graded 0 with this message (There was a problem compiling the code from your notebook, please check that you saved before submitting. Details:
No module named ‘unittests’) Please help!

Hey there @Anthony_Eri

Try resubmitting your code another time, sometimes this can solve the problem. If the issue presists (assuming that your code and indentations are correct), you can try reverting your notebook back to the latest checkpoint and rewriting your code from beginning (download the notebook before doing this).

Hope it helps! Feel free to ask if you need further assistance.

Okay i will try resubmitting tomorrow or give it a few days and of course my code and indentations are correct. Assuming the problem persists, how do i revert my notebook back to the latest checkpoint?

Note that MLS Course 1 Week 1 does not have any graded assignments.

Are you sure you are referencing the correct course and week?

You can do it in the following order:

FileCheckpointsRevert (to the latest version)

Btw, make sure your tags are correct as @TMosh mentioned.

i have reverted to the latest version and i am still experiencing the same issue.

Here is a snapshot of my code. Tests all passed. Indentations all correct. And a snapshot of error message i receive after submitting

Posting grade cells codes is against community guidelines, kindly refrain from sharing any solution codes correct or incorrect

When the grader throws that short of structural error, it may be reported for every function. So the issue is probably associated with your notebook, rather than the create_training_data() function itself.

I was able to find the C1W1 assignment. But it is not in the Machine Learning Specialization.

It is in the Tensorflow Developer course, in the “tensorflow-1-public” repo.

I’m not a mentor for that course, so I am not familiar with how the resource files are organized. The unintttests.py asset should be imported by this statement:

image

I was not able to find any unittests.py file in the repo.

Perhaps if you move your thread to the correct Forum for that course, you will be able to get informed assistance.

1 Like

I have moved this thread to what I think is probably the correct forum area.

Hi @Anthony_Eri

Can you please provide information if you are running the assignment in Coursera provided environment?

Because if you follow the link it would have all the list of assignment files and unittest.py file together.

The moment you click the programme assignment page link, what page opens, please share a screenshot of that page gere.

Also make don’t post any image that includes any grade cell codes as it is against community guidelines.

Also can I know you are completing the whole assignment and submitting your assignment or submitted after the grade cell create training data??

Regards
DP

So what should i do about my notebook?

i imported unittests.py

Yes i am running the assignment in Coursera provided environment

Yes it has the assignment files and unittest.py

This is a screenshot of the programming assignment page

Noted about posting grade cell codes

i have completed the whole assignment and submitted my assignment dozen times

I am asking the lab environment page screenshot not the browser log screenshot. Also if you can DM your codes for the first grade cell. Click on my name and then message.

Also can I know when you enrolled for this course as this course was recently updated and there are changes between the older and newer version of assignment.

you are not suppose to import unittest this way, when you do an assignment in the Coursera provided environment, the lab is already added with necessary metadata.

Also please note for successful submission of your grade, you are suppose to only write codes between assigned markers ###START AND END CODE HERE###

Editing any other part of assignment, can cause submission failure.

No addition of cells, editing or adding extra code lines can still cause submission failure.

Get a fresh copy and re-do your assignment.