UrbanAnalyst / gtfsrouter

Routing and analysis engine for GTFS (General Transit Feed Specification) data
https://urbananalyst.github.io/gtfsrouter/
81 stars 17 forks source link

Error with ids using characters #2

Closed polettif closed 5 years ago

polettif commented 5 years ago

I tried to run the router on the Swiss GTFS feed and received the following error:

Error in rcpp_make_timetable(gtfs$stop_times) : 
  Not compatible with requested type: [type=character; target=integer].

I guess there's a problem is with the ids (stops or trips) using characters. For example, a typical trip id is 63.TA.18-26-j19-1.25.R. AFAIK the gtfs spec doesn't state that ids have to be numeric?

mpadge commented 5 years ago

I think this should now be resolved - I wasn't forcing data.table::fread NOT to auto-convert a lot of things to integer64. That's now been fixed, and appears to have resolved a lot of problems. But if your problem persists, please paste a reprex here.

polettif commented 5 years ago

I installed the newest version and I still get the same error. I can't use dput for the extracted feed (data.table uses internal pointers) so I uploaded a valid test feed.

testfeed <- gtfsrouter::extract_gtfs("routing.zip")
gtfsrouter::gtfs_route(testfeed, "One", "Eight")
#> Error in rcpp_make_timetable(gtfs_cp$stop_times): Not compatible with requested type: [type=character; target=integer].
mpadge commented 5 years ago

Thanks - I'll fix the code asap