The shape ID for 3 Av-138 St bound 6 trains is causing a crash on calculating direction
Closed this issue · 2 comments
tolidano commented
The shape ID appears to be empty or 0 across multiple gtfs feeds over the last 48 hours:
NO SHAPE ID 0 FOR 6 3 Av-138 St None None
Traceback (most recent call last):
File "/Users/shawn/dev/yamtam/merge/parsers/paths.py", line 173, in <module>
out = paths()
^^^^^^^
File "/Users/shawn/dev/yamtam/merge/parsers/paths.py", line 86, in paths
key = f"{train.route_id}/{train.direction}/{train.headsign_text}"
^^^^^^^^^^^^^^^
File "/Users/shawn/.pyenv/versions/3.11.3/lib/python3.11/site-packages/nyct_gtfs/trip.py", line 278, in direction
return self.shape_id.split('..')[1][0] if '..' in self.trip_id else self.shape_id.split('.')[1][0]
~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
tolidano commented
^H063600_0^Z^H20231105*^A6Ê>^R
^P06 1036 BBR/3AB^R^T^Z^F^Pàì<9e>ª^F"^D640NÊ>^C
Trip ID is 063600_0
tolidano commented
Another interesting error:
^R099561_-> Main Str^Z^H20231106*^A7Ê>^T
^P$7 1635+ TSQ/MST^P^A^R^W^R^F^P°Ì¥ª^F"^D701NÊ>^F
^A2^R^A2^RR
^F000425"H
8
^R099561_-> Main Str^Z^H20231106*^A7Ê>^T
That -> Main Str
is not expected either.