Check_for_leakage error:

Hi,

I get the error:“Cell #5. Can’t compile the student’s code. Error: AssertionError(‘Not all tests were passed for check_for_leakage. Check your equations and avoid using global variables inside the function.’,)” when I submit the lab.

The function runs properly and returns “All tests passed.”.

Here is a screenshot of my code.

Can you share your lab ID with me ? In the assignment, when you click the top right “Help” button, a panel will open and your lab ID will be shown at the bottom.
I shall take a look.

When you reply back, kindly tag me in the post so that I’m notified.

Thanks,
Mubsi

1 Like

Your code looks pretty similar to mine, which passed both the tests in the notebook and the grader. The differences are that I used the values attribute of the patient_col and then did not convert the intersection to a python list. My guess is that latter point doesn’t really matter, since you only care about the length of the result. So it’s probably worth checking if the values issue makes a difference or not.

1 Like

Hi @Niklas_Wrede,

About a week or so, we had an issue where some learners were not able to save their work. You have the same issue. So what has happened is, all the solutions in your notebook were not saved, and when you submitted your notebook, it went as empty (empty as in, without your implementations of the exercises)

The proof for that is, when I look at your notebook, it is empty. And that, when I try to save your notebook, it says you have permissions error.

Kindly send me your email you use for Coursera and I shall ask them to fix this for you.

Best,
Mubsi

1 Like

Hi @Mubsi,

My email is niklaswred@gmail.com.

Thanks a lot,
Niklas

1 Like

Hi @Niklas_Wrede,

The issue has been fixed. Please implement the functions and submit again.

Best,
Mubsi

1 Like

Hi @Mubsi,

Thank you, it worked now!

Greetings,
Niklas

1 Like

Hi
I am facing the same issue for check_for_leakage error. Please help me submitting my assignment too. I am attaching the snapshot too


my email is anjalisharm0011@gmail.com

1 Like

Hi @Anjali_Sharma3,

Looking at your assignment, no exercises has been attempted (or maybe you refreshed your lab?) which is why you are are facing errors, both, in the assignment and the autograder. Please attempt the exercises, try to pass all of the unit tests and then let me know if you still face any errors with the autograder.

Also, you have to attempt every question before submitting. You cannot get individual grading for each exercise.

Best,
Mubsi

1 Like