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
I am loading Transperth's GTFS data using this function: loaded_feed = gtfs_functions.Feed(feed_path, time_windows=[0, 24], busiest_date=False, patterns=False)
and then trying to access loaded_feed.shapes. This throws the following exception:
File "[snip]trunk\open_data_toolset\ingestor\__main__.py", line 15, in <module>
data_processing.process(input_file=args.input, force=args.f)
File "[snip]trunk\open_data_toolset\ingestor\data_processing\__init__.py", line 52, in process
process_tool.get(data_tool, lambda *args: unknown_tool_error(data_tool))(config, force)
File "[snip]trunk\open_data_toolset\ingestor\data_processing\gtfs.py", line 175, in process
trips = parsing.load_gtfs_trips(os.path.join(base_path, location))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "[snip]trunk\open_data_toolset\ingestor\data_processing\parsing.py", line 334, in load_gtfs_trips
data = data.join(loaded_feed.shapes.set_index('shape_id'), on='shape_id', how='inner')
^^^^^^^^^^^^^^^^^^
File "[snip]venv-test\Lib\site-packages\gtfs_functions\gtfs_functions.py", line 213, in shapes
self._shapes = self.get_shapes()
^^^^^^^^^^^^^^^^^
File "[snip]venv-test\Lib\site-packages\gtfs_functions\gtfs_functions.py", line 726, in get_shapes
aux.sort_values(['shape_id','shape_pt_sequence'], inplace=True)
File "[snip]venv-test\Lib\site-packages\pandas\util\_decorators.py", line 331, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "[snip]venv-test\Lib\site-packages\pandas\core\frame.py", line 6894, in sort_values
keys = [self._get_label_or_level_values(x, axis=axis) for x in by]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "[snip]venv-test\Lib\site-packages\pandas\core\frame.py", line 6894, in <listcomp>
keys = [self._get_label_or_level_values(x, axis=axis) for x in by]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "[snip]venv-test\Lib\site-packages\pandas\core\generic.py", line 1850, in _get_label_or_level_values
raise KeyError(key)
KeyError: 'shape_pt_sequence'
I'm not too familiar with GTFS, but I ran the data through https://gtfs-validator.mobilitydata.org and didn't receive any errors, and looking at shapes.txt shape_pt_sequence does appear to be there and populated. My code works with a variety of other Australian GTFS feeds and I couldn't find any obvious differences in their shapes.txt (although I may well be looking in the wrong place)
I'm using gtfs-functions 2.5.
The text was updated successfully, but these errors were encountered:
I am loading Transperth's GTFS data using this function:
loaded_feed = gtfs_functions.Feed(feed_path, time_windows=[0, 24], busiest_date=False, patterns=False)
and then trying to access
loaded_feed.shapes
. This throws the following exception:I'm not too familiar with GTFS, but I ran the data through https://gtfs-validator.mobilitydata.org and didn't receive any errors, and looking at shapes.txt
shape_pt_sequence
does appear to be there and populated. My code works with a variety of other Australian GTFS feeds and I couldn't find any obvious differences in their shapes.txt (although I may well be looking in the wrong place)I'm using gtfs-functions 2.5.
The text was updated successfully, but these errors were encountered: