I am having an issue with the “Programming Assignment: Building a Travel & Flight Optimization App” graded exercise 1 “find shortest path”. I have interacted with LLM to generate proper code and pasted the code in the graded cell. But when I run cell 6, I receive error. Do I need to define the “generate_graph_json” method too? I thought it is already defined.
Assignment C1M3 Exercise 1
No. You don’t need to. It is already written for you in the utils.py file and is being imported in the notebook in the first cell itself. Check for the following cell.
```
import unittests as unittests
from utils import (
generate_graph_json,
validate_graph_json,
plot_graph_with_path,
plot_continent_path,
load_world_tour_graph,
load_continents_graph,
create_country_coords_for_plot,
create_americas_tour_widget,
launch_tour_widget
)
```
In fact this function is used in the following playground section (3) (cells 2,3,4). Please make sure that you have imported it correctly. Let me know if it persists.
Regards
At this point, it might also be a good idea to restore the original version of the assignment. You can do this by clicking the question mark icon in the top right-hand corner. There should be an option like “Restore original version” — select that to revert everything back to the default state.
