I want to save the grade exercise notebook and being able to execute it locally, but when I run the cells with the tests I get the following error message:
AttributeError: Can’t pickle local object ‘test_shortest_path..g..helper’
Yes. I downloaded all the files including those in the data folder.
I try debugging with an LLM and the reply was that the helper function should not be defined inside the g function in order to use pickle for multiprocessing.
Although this answer is consistent with what I saw in several web posts, it doesn’t explain why it works on the coursera hosted environment.