C3_W1 Grader found global variables inside graded fuctions

I am trying to get the programming assignmenet for C3_W1 through the grader and get back the message “Grader found global variables inside graded functions. Please avoid using global variables in your functions.” for every one of the graded sections. I know what global variables are and there are none used in any of the graded functions. How can I debug this problem?

1 Like

Hi @ray.hookway,

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 Error: Grader feedback 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.


This clearly mentions if you do any of the listed things you will run into Grader Error: Grader feedback not found.

Please make sure you are not doing any of these listed things.

Best,
Mubsi

P.S you’d be surprised how many times I have had learners say they are absolutely sure they don’t have global variable inside their functions, only to later find out that they do. My recommendation would be to thoroughly check one more time.

1 Like

Dear @ray.hookway,

Please thoroughly check the code, there must be some global variable inside the function.

After checking restart the kernel.

Mubsi,

Note that the error I am receiving is “Grader found global variables inside graded functions. Please avoid using global variables in your functions.” not " Grader Error: Grader feedback not found ." I receive this error for each of the graded sections and I have checked them all and don’t believe I have used any global variables. I could believe that I might have missed something in one of the functions, but I have a hard time believing I made the same mistake in all of them. There seems to be some kind of systematic problem that I can’t find. Since the grader is totally opaque I am at a loss as to how to go about debugging this. I have checked for all the listed things to avoid and don’t think I have done any of them. I have even tried reseting the lab and carefully redoing it to no avail.

How can I debug this problem? Can you provide more information about how the grader works. Do you want more information about my lab submission? (I assume that you have a way to look at it?)

1 Like

I looked over the code, and did not find anything obviously wrong.

Hopefully a mentor for this course will reply here.

1 Like

Thanks for the help!

1 Like

Can someone please tell me how to debug this problem? Playing Russian Roulette with the grader doesn’t seem like an effective way to debug.

1 Like

Hi @ray.hookway,

Certainly. I’ll send you a direct message regarding this now.

Best,
Mubsi

1 Like