The pickle file contains a reference to routemap_updater module and can not find it during load.
Code:
import os
from airlift.envs import AirliftEnv
filename = f"../../../scenarios_dev/Test_0/Level_0.pkl"
filename = f"../../../scenarios_warmup/Test_0/Level_0.pkl"
print(filename)
env = AirliftEnv.load(filename)
exit(1)
Error message:
$ python test_cargo
python: can't open file '/Users/johnkolen/Projects/AirLift2/current/solution/planner/test_cargo': [Errno 2] No such file or directory
(base) Johns-MacBook-Pro:planner johnkolen$ python test_cargo.py
../../../scenarios_warmup/Test_0/Level_0.pkl
Traceback (most recent call last):
File "/Users/johnkolen/Projects/AirLift2/current/solution/planner/test_cargo.py", line 2, in <module>
from test_case_scenario import TestCaseScenario
File "/Users/johnkolen/Projects/AirLift2/current/solution/planner/test_case_scenario.py", line 7, in <module>
env = AirliftEnv.load(filename)
File "/Users/johnkolen/Projects/AirLift2/airlift/airlift/envs/airlift_env.py", line 791, in load
env = pickle.load(file)
ModuleNotFoundError: No module named 'airlift.envs.generators.routemap_updater'
hi jkolen,
Have you pulled the latest commit from our github repo? We pushed some updates to it on Wednesday and that included the route-map updater file.
https://github.com/airlift-challenge/airlift/blob/main/airlift/envs/generators/routemap_updater.py
Posted by: adelanovic @ Nov. 24, 2023, 6:41 p.m.Thanks! That was the problem.
Posted by: jkolen @ Nov. 24, 2023, 7:08 p.m.