Bondify / gtfs_functions

Package with useful functions to create geo-spatial visualizations from a GTFS.
MIT License
114 stars 30 forks source link

Calling feed.trips fails #28

Closed johanngrobe closed 7 months ago

johanngrobe commented 10 months ago

I am trying to analyse the german GTFS feed from the following website: https://gtfs.de/en/feeds/ Whenever I run the following code I get an ValueError. The error occurs when patterns are being computed. I have tried other GTFS feeds as well and still get the same ValueError. How can I fix this issue?

feed = Feed("data/germany-gtfs.zip")
feed.trips

Output:

INFO:root:computing patterns
ValueError: Cannot set a DataFrame with multiple columns to the single column pattern_id
Bondify commented 9 months ago

hi @johanngrobe my guess is that there's something strange in this GTFS file. The latest version should give you better error messages as of why this is happening. Can you try updating the package and trying to run it again?

You can also try Feed(gtfs_path, patterns=False) if you are not particularly interested in the patterns.

Bondify commented 7 months ago

Closing issue. You can re-open with the latest info if needed