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."
This commit is contained in:
Kapler 2024-03-13 17:33:21 +08:00 committed by Blyron
parent 2353b89a18
commit 80af6025b3
1 changed files with 1 additions and 1 deletions

View File

@ -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):