Unit tests are successful but grading is failing

Hi, I completed the all the unit tests successfully but when I submit the assignment, it shows issues. Please help. It’s been so many days and attempts to first get the unit tests complete successfully and now this issue.
Thanks,
Udhay

I would recommend revisiting the implementation of the functions and reviewing them carefully based on the grader feedback (e.g. for the shortest_path function, it throws an exception “name ‘dist’ is not defined”). This might provide clues about where the issue lies.

I got a similar error message as you post in the screenshot referred to “Exception found… name ‘dist’ is not defined”, but mine was referred to ‘time’. It turned out that in the interactive script I had the ‘import time’ line in a separate cell and always all tests passed, but when submitted for grading I got that message for ‘time’. I resolved the problem by moving the line ‘import time’ to the top of the cell where ‘class Graph_Advanced’ is defined. That was it!

Hi @uparerikkal,

Usually non defined variables in grader, but locally the code runs is an issue that happens when you move a graded cell from its initial place. It happens because the grader looks the specific grded cells where initially your solution was placed. I would recommend moving your solution back to the graded cell, or if you deleted it, you may refresh your workspace to get a new copy of it and then place the solutions in the correct cell.