You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
when parsing the Sydney Transport feed through gtfs2rrrr, an exception was raised "ValueError: Negative times". I worked out this error was due to the Sydney GTFS feed containing empty arrival and departure times for some of the stop times (None < 0 is true). According to the GTFS specifications it is valid to have empty arrival and departure times as long as they are not time points. https://developers.google.com/transit/gtfs/reference#stop_times_fields
I fixed this issue by storing the last valid arrival and departure times and substituting those values if arrival or departure time was null (none). This was a quick fix, though it would be beneficial to others if there was improvements made to the script to allow stop_times without times.
Trace:
Traceback (most recent call last):
File "gtfs2rrrr.py", line 109, in <module> main()
File "gtfs2rrrr.py", line 102, in main
tdata = convert(gtfsdb)
File "gtfs2rrrr.py", line 80, in convert
vj.add_stop(stop_id,arrival_time,departure_time,forboarding=(pickup_type != 1),foralighting=(drop_off_type != 1))
File "model/transit.py", line 199, in add_stop
raise ValueError('Negative times')
ValueError: Negative times
Thanks
The text was updated successfully, but these errors were encountered:
Hi,
when parsing the Sydney Transport feed through gtfs2rrrr, an exception was raised "ValueError: Negative times". I worked out this error was due to the Sydney GTFS feed containing empty arrival and departure times for some of the stop times (None < 0 is true). According to the GTFS specifications it is valid to have empty arrival and departure times as long as they are not time points.
https://developers.google.com/transit/gtfs/reference#stop_times_fields
I fixed this issue by storing the last valid arrival and departure times and substituting those values if arrival or departure time was null (none). This was a quick fix, though it would be beneficial to others if there was improvements made to the script to allow stop_times without times.
Trace:
Thanks
The text was updated successfully, but these errors were encountered: