Getting error in Exercise 1 and Exercise 7 pls help

My lab id is ybvyfubbyskm

I am not a mentor for NLP C2, but please realize that only the course staff can actually look at your notebooks. The mentors do not have that “superpower”. The best way to get help would be to start by showing us the actual error messages that you are getting.

I am getting this error pls reply

Hi @Ashwini_Ramanuj,

Thank you for taking our courses and joining our community! Welcome!

Please know, it is rude to ask for help from staff or the mentors just by saying “pls help” and only sharing your lab ID.

As Paul mentioned above, mentors cannot access your lab using the ID so there’s no point sharing it. As Paul mentioned, please start by sharing the details of the error you are getting, which can be best done by sharing the error trace or screenshots (but please know, sharing the solution code is against the honour code of this community).

If the need requires to take a look at your your code or notebook, the staff or the mentors will direct message your regarding that.

sorry, i was not aware of this

As for the error you are getting, firstly, take a look at the note provided at the start of every assignment:

At the start of the notebook there’s:

**Important Note on Submission to the AutoGrader**

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.

If you do any of the following, you will get something like, Grader not found (or similarly unexpected) error upon submitting your assignment. Before asking for help/debugging the errors in your assignment, check for these first. If this is the case, and you don't remember the changes you have made, you can get a fresh copy of the assignment by following these instructions.

At a quick glance at your exercise 1, you have violated 3 and 5.

The original function parameters are:
def create_dictionaries(training_corpus, vocab, verbose=True):

But you have changed it to:
def create_dictionaries(training_corpus, vocab):

(You removed verbose=True)

And later, to accommodate this change, you further changed the code which was already provided to you. The original was:

if i % 50000 == 0 and verbose:
            print(f"word count = {I}")

But you changed it to:

if i % 50000 == 0:
            print(f"word count = {I}")

(you removed and verbose)

Please, do not change the code where you are not asked to, otherwise you’ll run in errors which will be harder to catch. The unit tests are build using that code, which is why you are failing it even though your rest of exercise 1 is correct.

Revert back to this original code and you shall see that you’ll pass.

In the future, please refrain from changing code where you are not asked to.

Thanks and happy learning!

1 Like

@Ashwini_Ramanuj (forgot to tag you above)