From 80af6025b3d6a86a979486d25d39561e9678b573 Mon Sep 17 00:00:00 2001 From: Kapler Date: Wed, 13 Mar 2024 17:33:21 +0800 Subject: [PATCH] Fix the misuse of the traci module in line 304 of sumo_simulation.py "sumolib" is not a submodule of "traci", which is why the error "module 'traci' has no attribute 'sumolib'" occurs. To fix this, remove the reference to "traci." --- Co-Simulation/Sumo/sumo_integration/sumo_simulation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Co-Simulation/Sumo/sumo_integration/sumo_simulation.py b/Co-Simulation/Sumo/sumo_integration/sumo_simulation.py index 7756ff80a..22aeb7474 100644 --- a/Co-Simulation/Sumo/sumo_integration/sumo_simulation.py +++ b/Co-Simulation/Sumo/sumo_integration/sumo_simulation.py @@ -301,7 +301,7 @@ def _get_sumo_net(cfg_file): net_file = os.path.join(os.path.dirname(cfg_file), tag.get('value')) logging.debug('Reading net file: %s', net_file) - sumo_net = traci.sumolib.net.readNet(net_file) + sumo_net = sumolib.net.readNet(net_file) return sumo_net class SumoSimulation(object):