Closed mmarks91 closed 9 months ago
hi @mmarks91 , sorry for the late reply. It is the first time I see this kind of error. Would you mind attaching the source GTFS for this code?
Hi, I'm so sorry for the even later reply on my end. I ended up putting this project aside for a while but am now coming back to it.
There are a handful of GTFS files I've seen with this issue, but here is an example from MetroWest in Massachusetts. Seems like it has all the necessary files to run gtfs_functions (stops, stop_times, trips, routes, shapes). In this case, stops_freq works just fine, but line_freq generates the "max_trips" error. Would love to know what might cause this error.
Thank you!!!
On Sun, Apr 25, 2021 at 1:04 PM Santiago Toso @.***> wrote:
hi @mmarks91 https://github.com/mmarks91 , sorry for the late reply. It is the first time I see this kind of error. Would you mind attaching the source GTFS for this code?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Bondify/gtfs_functions/issues/5#issuecomment-826355912, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEMMVTKKNYSK5POX5SJMRULTKRDQZANCNFSM4Z3NE6VA .
-- Michael Marks @.*** (301)-767-6553
Hi, I had the same issue and my problem was that the field "direction_id" in my GTFS dataset was NAN. Thus, I have tried to set it to a generic value 1, and it solved the problem. Hope it can help.
I've been using gtfs_functions to create stop_freq tables for a number of transit agencies. Stop_freq seems to work without a hitch for larger agencies, but I've had some trouble generating stop_freq for smaller agencies--I'll get a key error for max_trips. I've tried to do some workarounds by assigning new trip_ids to the stop_times file, in case the issue was the trip_id, but that hasn't seemed to work. I also tried creating a new stop_times file that doesn't have any null arrival/departure times and feeding it to stop_freq, but that hasn't worked either.
I was wondering if there's an explanation for what might cause a GTFS file to generate this error in stop_freq, and if there is any potential workaround. Thank you!
Below is the error I've received when trying to generate stop_freq: