C2W2_Assignment - Problems and Errors

Hello all,

I’m familiar with Coursera, but when i reach to the weeks 2 of Feature Engineering, it is all a headache, i solve it like many times and i can see the solution matches but i graded zero ! you can see the picture below !

please someone tell me exactly what is this error i’m giving up on that course already

I’m not a mentor for this course, but here is a common issue:

Have you downloaded your notebook and used it on some other platform, then uploaded it back to Coursera for grading?

Thanks @TMosh , but no i didn’t upload it, just worked on the course notebook itself

OK, that eliminates a lot of potential causes.
Other questions:

  • Does your code use a variable named “census_constants”?
  • Should it? Is it a global variable, or local?

Hopefully a mentor for this course will stop by soon.

Yes, as below ::

import census_constants

Unpack the contents of the constants module

_LABEL_KEY = census_constants.LABEL_KEY
_transformed_name = census_constants.transformed_name

The reason I asked if you had worked on your notebook on another platform:

The grader uses some metadata in each cell to decide which ones it will read in.

If the metadata for the cell that has “import census_constants” has been modified so that the grader ignores it, then you may get the error you are seeing.


The 1st exercise doesn’t depend on cencus_constants. Please use #grade-up-to-here comment to partially grade your submission and incrementally debug your work.

@TMosh Please tag me on MLEP posts that require mentor attention.

You mean, i have to delete ( cencus_constants ) and then add instead #grade-up-to-here ?

You can place the comment in any code cell (preferably the as the last line within the code cell) . Code till that comment will be graded and the rest of the notebook will be skipped.

Reminder that this is only true in courses that support partial grading.

This specialization does support the tag. The information is provided as part of the reading material in the link I shared.

That’s good.

Not all courses use it, so I hesitate to recommend it (rather preferring some rigorous debugging).

It also tends to enable students to achieve the bare minimum passing score, rather than complete the entire notebook and get the full benefit at 100%.

I agree with your comment about not all specializations supporting the tag.

As far as learners choosing to complete an assignment partially, who knows what their issue is:

  1. Company sponsoring their course on coursera.
  2. Project deadlines. A few Indian companies require certified folks to work on a client project (this impacts billing).

Good points.