Closed tge12 closed 2 years ago
$ more gtfs_publictransport.add.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- generated on 2021-11-14 22:24:37.058733 by gtfs2pt.py UNKNOWN
options: -n osm.net.xml <doubleminus>gtfs ../LVB-GTFS-Daten-05112021.zip <doubleminus>date 20190904 <doubleminus>vtype-output pt_vtypes.xml
-->
<additional xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/additional_file.xsd">
</additional>
I can reproduce the problem with --osm-routes
I tried to reproduce it and at least it is not totally empty here but contains only four trips
I had a closer look and would consider the GTFS file at least incomplete if not broken. For the majority of the inner city bus and tram services there are no trips on the given date. Please add further comments if you can resolve this.
The following command runs but does not generate actual XML data: $ python3 $SUMO_HOME/tools/import/gtfs/gtfs2pt.py -n osm.net.xml --gtfs ../LVB-GTFS-Daten-05112021.zip --date 20190904 --vtype-output pt_vtypes.xml
For example:
$ more gtfs_publictransport.add.xml <?xml version="1.0" encoding="UTF-8"?>
Version is from daily snapshot (14.11.2021) - I replaced only the files tools/import/gtfs/* into a 1.10.0 installation. Interesting: There are intermediate files (?) in ./input which contain wrong timestamps, e.g.: 542 1970-03-02 16:15:00 11.766887 51.132499 70 72.000 The timestamps in the ZIP look OK. I also tried the PY command above with a --date 19700904, did not work either.
Trying the same with OSM data fails entirely:
$ python3 $SUMO_HOME/tools/import/gtfs/gtfs2pt.py -n osm.net.xml --gtfs ../LVB-GTFS-Daten-05112021.zip --date 20190904 --osm-routes osm_ptlines.xml --repair function import_gtfs called at Sun, 14 Nov 2021 22:06:39 +0000 function import_gtfs finished after 5.415945 seconds function filter_gtfs called at Sun, 14 Nov 2021 22:06:45 +0000 Traceback (most recent call last): File "/usr/share/sumo/tools/import/gtfs/gtfs2pt.py", line 430, in
main(get_options())
File "/usr/share/sumo/tools/import/gtfs/gtfs2pt.py", line 377, in main
stops, stop_times)
File "/usr/share/sumo/tools/sumolib/miscutils.py", line 41, in benchmark_wrapper
result = func(*args, **kwargs)
File "/usr/share/sumo/tools/import/gtfs/gtfs2osm.py", line 189, in filter_gtfs
shapes['shape_pt_lat'] = shapes['shape_pt_lat'].astype(float)
TypeError: 'NoneType' object is not subscriptable
The ZIP file does not contain shapes.txt! The ZIP is from here: https://opendata.leipzig.de/dataset/lvb-fahrplandaten If of any help, I can provide the network file.