flow-project/flow

Tutorial 06 OSM .net.xml not found

Nicholas-Kastanos opened this issue · 5 comments

Bug Description

I am attempting to run Tutorial 06 (osm) for the bay bridge example. When running the expermiment, the .net.xml file cannot be found.

Bug Reproduce

File in which the bug occurred: flow/flow/core/kernel/scenario/traci.py

The exact command that you did run that caused the bug:
Run All tutorial06_osm.ipynb

Output Log

Full error output log:

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-5-13845245c342> in <module>
      3     env_params=env_params,
      4     sim_params=sim_params,
----> 5     scenario=scenario
      6 )
      7 

~/Documents/flow/flow/envs/base_env.py in __init__(self, env_params, sim_params, scenario, simulator)
    148         # use the scenario class's network parameters to generate the necessary
    149         # scenario components within the scenario kernel
--> 150         self.k.scenario.generate_network(scenario)
    151 
    152         # initial the vehicles kernel using the VehicleParams object

~/Documents/flow/flow/core/kernel/scenario/traci.py in generate_network(self, network)
    124         elif self.network.net_params.osm_path is not None:
    125             self._edges, self._connections = self.generate_net_from_osm(
--> 126                 self.network.net_params)
    127         else:
    128             # combine all connections into a list

~/Documents/flow/flow/core/kernel/scenario/traci.py in generate_net_from_osm(self, net_params)
    567 
    568         # collect data from the generated network configuration file
--> 569         edges_dict, conn_dict = self._import_edges_from_net(net_params)
    570 
    571         return edges_dict, conn_dict

~/Documents/flow/flow/core/kernel/scenario/traci.py in _import_edges_from_net(self, net_params)
    831         net_path = os.path.join(self.cfg_path, self.netfn) \
    832             if net_params.template is None else self.netfn
--> 833         tree = ElementTree.parse(net_path, parser=parser)
    834         root = tree.getroot()
    835 

~/anaconda3/envs/flow/lib/python3.6/xml/etree/ElementTree.py in parse(source, parser)
   1194     """
   1195     tree = ElementTree()
-> 1196     tree.parse(source, parser)
   1197     return tree
   1198 

~/anaconda3/envs/flow/lib/python3.6/xml/etree/ElementTree.py in parse(self, source, parser)
    584         close_source = False
    585         if not hasattr(source, "read"):
--> 586             source = open(source, "rb")
    587             close_source = True
    588         try:

FileNotFoundError: [Errno 2] No such file or directory: '~/Documents/flow/flow/core/kernel/scenario/debug/cfg/bay_bridge_20201207-1535421607355342.4049687.net.xml'

Versions

  • OS: Ubuntu 20.04
  • Flow version: 0.4.1
  • Flow commit number: b72040e

I also get this error in tutorial01

I also get this error in tutorial01

Sorry, apparently this is an issue with my file naming convention

When I was compiling SUMO, I did not define the ACCEPT_USE_OF_DEPRECATED_PROJ_API_H CPP macro

Hi,
I'm encountering a similar issue in tutorial 6. Would you be able to tell me how you solved it @Nicholas-Kastanos ? Thanks in advance!

@rohanpaleja27 I defined the macro mentioned above during compilation of SUMO. Unfortunately it was long ago and cannot remember more details.