When attempting to run cut_gtfs on the attached feed, I got the following error "Length of values (25) does not match length of index (24)." It seems that the error is being thrown when attempting to concatenate two dataframes of different lengths on this line:
I added this code in the format_shapes() function to fill the mismatching geometries with NA values, and then removed those later from the dataframe. This worked as a temporary fix for me since the problem only affected 5 routes. However, would be good to figure out what is causing the problem in the first place.
When attempting to run cut_gtfs on the attached feed, I got the following error "Length of values (25) does not match length of index (24)." It seems that the error is being thrown when attempting to concatenate two dataframes of different lengths on this line:
https://github.com/Bondify/gtfs_functions/blob/0fadd44e7f30bc5bfee379103ac6378bfbdde94a/gtfs_functions/gtfs_funtions.py#L661
I added this code in the format_shapes() function to fill the mismatching geometries with NA values, and then removed those later from the dataframe. This worked as a temporary fix for me since the problem only affected 5 routes. However, would be good to figure out what is causing the problem in the first place.
Feed: mbta_proposed.zip
Code: