eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.57k stars 1.43k forks source link

Issue with OSM Web Wizard #9328

Closed HillelPaley closed 1 year ago

HillelPaley commented 3 years ago

Hello all. I opened "OSM Web Wizard" using the py file (osmwebwizard.py), I clicked on "generate scenario", it showed me that it's loading, but when it's done, nothing happened, it doesn't open the scenario in sumo.gui, why is that? and what should I do to fix it?

edit: it created a file in the name: "2021-10-11-13-39-33", as it should, but the file is empty...

Felix-Feng-90 commented 3 years ago

Might be the same issue as this, https://github.com/eclipse/sumo/issues/9304

behrisch commented 3 years ago

Can you please have a look in the shell window which opened when you started the web wizard whether there are any error messages?

aisiklar commented 1 year ago

Hi. Is there a solution or progress in this error. I have encountered similar issue. When I submit "generate scenario" it stays in the "downloading map data" states for few seconds then it says "recovering" and resumes its initial state. Nothing seems to occur.

Thanks. alptekin. p.s. I doesn't change any settings or parameters. Keep the default city (Berlin) and doesnt evem change the area. (no change if i make the area smaller). I tried both in macos and windows.

namdre commented 1 year ago

The most likely cause is that the OpenStreetMap servers refuse the connection from your network. This error cannot be fixed from the SUMO side. The latest SUMO release tries to give some more feedback to make the problem more obvious (feel free to post the output from the shell window if you're using the latest release).

behrisch commented 1 year ago

Please also try from a different network, sometimes OSM blocks big institutions because it receives a lot of traffic from there. Another option is to try to make the download as small as possible by disabling the polygons and/or making it a car only network

aisiklar commented 1 year ago

Hi, thanks for all the answers. to be frank, with respect, I dont think it is because of the network. Nevertheless, I tried applying the above suggestions (another network, no polygons and car-only network selected) and although the error statements were different, still it was a failure.

for the first case (polygon added and car-only network NOT selected) the error I see on the vs code terminal (for osmWebWizard.py):

I think it is due to variable "HOME_SUMO"... Because when I tried again with the suggestions (no polygons and car-only network selected) above, it gave another type of error (please check below for " error when the suggestions are applied").

I know it is too much text below. Just wanted to give the whole error, I feel / think it is due to assigning the SUMO_HOME but I dont know what to do.

Thanks a lot for any comments. alptekin

The error statements are below:

**** 1st case: standard parameters and config (polygons selected and car-only network not selected)**

Building scenario in '/Users/alptekin/Documents/development/sumo-simulator/sumo/tools/2022-11-30-10-05-29' Downloading map data 200 OK Converting map data Traceback (most recent call last): File "/Users/alptekin/Documents/development/sumo-simulator/sumo/tools/osmWebWizard.py", line 493, in build builder.build() File "/Users/alptekin/Documents/development/sumo-simulator/sumo/tools/osmWebWizard.py", line 254, in build osmBuild.build(options) File "/Users/alptekin/Documents/development/sumo-simulator/sumo/tools/osmBuild.py", line 80, in build if options.typemap and not os.path.isfile(options.typemap.replace("${SUMO_HOME}", os.environ["SUMO_HOME"])):


  File "<frozen os>", line 678, in __getitem__
KeyError: 'SUMO_HOME'

Recovering

****************************** error when "no polygons" and "car-only network" selected *********************************

Building scenario in '/Users/alptekin/Documents/development/sumo-simulator/sumo/tools/2022-11-30-10-10-03'
Downloading map data
200 OK
Converting map data
Written configuration to 'osm.netccfg'
Warning: Environment variable SUMO_HOME is not set, XML validation will fail or use slow website lookups.
Parsing types from '/Users/alptekin/Documents/development/sumo-simulator/sumo/tools/../data/typemap/osmNetconvert.typ.xml' ... 
Error: invalid document structure
 In file '/Users/alptekin/Documents/development/sumo-simulator/sumo/tools/../data/typemap/osmNetconvert.typ.xml'
 At line/column 2/1.

done.
Parsing nodes from osm-file 'osm_bbox.osm.xml.gz' ... 
Repeating initial error messages:
invalid document structure
 In file '/Users/alptekin/Documents/development/sumo-simulator/sumo/tools/../data/typemap/osmNetconvert.typ.xml'
 At line/column 2/1.

Error: No nodes loaded.
Quitting (on error).
Traceback (most recent call last):
  File "/Users/alptekin/Documents/development/sumo-simulator/sumo/tools/sumolib/net/__init__.py", line 864, in readNet
    parse(gzip.open(filename), netreader)
          ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/python@3.11/3.11.0/Frameworks/Python.framework/Versions/3.11/lib/python3.11/gzip.py", line 58, in open
    binary_file = GzipFile(filename, gz_mode, compresslevel)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/python@3.11/3.11.0/Frameworks/Python.framework/Versions/3.11/lib/python3.11/gzip.py", line 174, in __init__
    fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/Users/alptekin/Documents/development/sumo-simulator/sumo/tools/2022-11-30-10-10-03/osm.net.xml.gz'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/alptekin/Documents/development/sumo-simulator/sumo/tools/osmWebWizard.py", line 493, in build
    builder.build()
  File "/Users/alptekin/Documents/development/sumo-simulator/sumo/tools/osmWebWizard.py", line 307, in build
    self.edges = sumolib.net.readNet(os.path.join(self.tmp, self.files["net"])).getEdges()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alptekin/Documents/development/sumo-simulator/sumo/tools/sumolib/net/__init__.py", line 866, in readNet
    parse(filename, netreader)
  File "/usr/local/Cellar/python@3.11/3.11.0/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xml/sax/__init__.py", line 33, in parse
    parser.parse(source)
  File "/usr/local/Cellar/python@3.11/3.11.0/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xml/sax/expatreader.py", line 105, in parse
    source = saxutils.prepare_input_source(source)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/python@3.11/3.11.0/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xml/sax/saxutils.py", line 365, in prepare_input_source
    f = urllib.request.urlopen(source.getSystemId())
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/python@3.11/3.11.0/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/python@3.11/3.11.0/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 503, in open
    req = Request(fullurl, data)
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/python@3.11/3.11.0/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 322, in __init__
    self.full_url = url
    ^^^^^^^^^^^^^
  File "/usr/local/Cellar/python@3.11/3.11.0/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 348, in full_url
    self._parse()
  File "/usr/local/Cellar/python@3.11/3.11.0/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 377, in _parse
    raise ValueError("unknown url type: %r" % self.full_url)
ValueError: unknown url type: '/Users/alptekin/Documents/development/sumo-simulator/sumo/tools/2022-11-30-10-10-03/osm.net.xml.gz'

Recovering
namdre commented 1 year ago

Given all the error context was an excellent choice on your part. It reveals that your system does not define SUMO_HOME. Define this environment variable to point to /Users/alptekin/Documents/development/sumo-simulator/sumo

aisiklar commented 1 year ago

Thanks Jakob. In fact I had written the env. variable into .zshrc file but I suppose I forgot to "source" it... Or somehow it did not recognize it. :( Sourced the zshrc file and restarted (as it suggested in the installation manual). Now it works well. :) best, alptekin

PARK090956 commented 1 year ago

Hello, I opened the OSM Web Wizard and created a network by creating a scenario. I want to change the edge of the network to a two-way lane, but it doesn't work. Is there any way?

namdre commented 1 year ago

See https://sumo.dlr.de/docs/Netedit/neteditPopupFunctions.html#add_reverse_direction (the function is now one level down in the edge operations sub-menu of the context menu.

behrisch commented 1 year ago

@PARK090956 And you should start netedit first (by pressing Ctrl+t). And please do not post questions in old tickets, just open a new one