Module 1 possible issue with grader

The grader reports the following error:

Failed test case: DoublyLinkedListFixed does not have add_node method. Aborting unittests.
Expected:
None,
but got:
None.

While the unittests.test_DoublyLinkedListFixed(DoublyLinkedListFixed) works as expected

@lucas.coutinho

And now it passed, strange? No changes were made to any methods. One possibility is that there was incorrect indentation but wouldn’t the unittests.test_DoublyLinkedListFixed(DoublyLinkedListFixed) fail in this case as well?

It seems you didn’t save your solution before submitting, so the autograder received an empty doubly linked list instead of your solution. Although it works when you run it in the notebook, the notebook doesn’t save automatically. It does save periodically, but it’s recommended to always save the notebook before submitting.

3 Likes

Good point! Thank you!

I did face the same issue at hand and, once saved the notebook, all tests passed were recorded and graded successfully.

I passed all test in my notebook but am getting this message when I submit my assignment for all 4 of my exercises. I am confused because it is referencing the Stack Class, which I left unedited as instructed. I also made sure to save my solutions. Is there something else that I may be missing?

1 Like

Did you download the notebook files and work on them in some other platform, then upload them back for grading?

No, I used the Coursera-guided environment for everything aside from the LLM.

OK.

Did you ever delete a cell, add a new cell, or move a cell to a new location in the notebook?

No, I left all cells in tact and only made changes to my code. I just refreshed the lab to make sure, but the same grading error shows up.

When you “refreshed the lab”, exactly what method did you use to update the lab with your added code?

After I refreshed the Notebook, I simply added my edited code to the exercise blocks. All other cells have not been modified and no external libraries have been imported. I have repeated once more to be sure. Still no luck.






One last question.

Have you renamed the notebook ipynb file?

No, it’s still named C2M1_Assignment.

Please check your personal messages for instructions.

1 Like

Running into the same problem. For me is_palindrome_fixed and dijkstra_fixed are accepted, StackFixed and DoublyLinkedListFixed are rejected. All problems pass all tests when running in the notebook. I tried Rebooting, Updating the work space, I remove all extra cells, I saved the notebook. Makes no difference. What else can I try?

The issue found in Jemyle’s notebook was that “Stack” was being used as a parent class.

The grader seems to have identified specific errors in your notebook.

Note that doing any of these can make the grader unhappy:

  • Moving a cell
  • Adding a cell
  • Deleting a cell
  • Renaming your notebook file.
1 Like

OK. Here is what worked for me. Move all existing files into a backup folder. Then go to Get Latest Version (from the ? menu item). This will replace all files so they are all original. Then I copy/pasted the fixed code into the existing cell without adding or removing any cells. Voila.

1 Like

That is a good method.

I am having issue after submitting. The code passed all the test but after submitting, I am getting this:

There was a problem compiling the code from your notebook, please check that you saved before submitting. Details:
inconsistent use of tabs and spaces in indentation (, line 122)

Same for all exercises