Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

error running extract segments (gtfs) #38

Open
idshklein opened this issue Sep 9, 2024 · 1 comment
Open

error running extract segments (gtfs) #38

idshklein opened this issue Sep 9, 2024 · 1 comment

Comments

@idshklein
Copy link

hi,
I try to run Extract segments on the gtfs file linked in this blog post:
https://anitagraser.com/2024/05/04/gtfs-algorithms-about-to-land-in-trajectools/
i.e. this link
https://www.mobilitydata.gv.at/daten/soll-fahrplandaten-gtfshttps://www.mobilitydata.gv.at/daten/soll-fahrplandaten-gtfs
I assume it is the one here:
image

extract shapes works just fine.

running extract segments, gives the following error:
Traceback (most recent call last):
File "C:\Users/idshk/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_trajectory\qgis_processing\gtfsAlgorithm.py", line 194, in processAlgorithm
segments = self.get_segments(feed, add_avg_speed)
File "C:\Users/idshk/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_trajectory\qgis_processing\gtfsAlgorithm.py", line 230, in get_segments
segments = feed.segments
File "C:\OSGeo4W\apps\Python39\lib\site-packages\gtfs_functions\gtfs_functions.py", line 234, in segments
self._segments = self.get_segments()
File "C:\OSGeo4W\apps\Python39\lib\site-packages\gtfs_functions\gtfs_functions.py", line 835, in get_segments
stop_times = self.stop_times
File "C:\OSGeo4W\apps\Python39\lib\site-packages\gtfs_functions\gtfs_functions.py", line 206, in stop_times
self._stop_times = self.get_stop_times()
File "C:\OSGeo4W\apps\Python39\lib\site-packages\gtfs_functions\gtfs_functions.py", line 679, in get_stop_times
trips = self.trips
File "C:\OSGeo4W\apps\Python39\lib\site-packages\gtfs_functions\gtfs_functions.py", line 176, in trips
self._trips = self.get_trips()
File "C:\OSGeo4W\apps\Python39\lib\site-packages\gtfs_functions\gtfs_functions.py", line 621, in get_trips
trips = trips.set_index('service_id').join(
File "C:\Users\idshk\AppData\Roaming\Python\Python39\site-packages\pandas\util_decorators.py", line 311, in wrapper
return func(*args, **kwargs)
TypeError: reset_index() got an unexpected keyword argument 'names'

@anitagraser
Copy link
Collaborator

Yes, that's the correct file. However, I cannot reproduce the error you mention. As you can see from the following screenshot, I don't get an error with this dataset:

image

Maybe there has been an issue with the download?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants