Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Error when querying several stops schedule with "now" or "today" #1277

Open
elsa-pato opened this issue Apr 17, 2019 · 0 comments
Open

Error when querying several stops schedule with "now" or "today" #1277

elsa-pato opened this issue Apr 17, 2019 · 0 comments

Comments

@elsa-pato
Copy link

Hi,

I'm running into an error when trying to use the special parameters "today" and "now" in schedule_stop_pairs, combined with a query concerning several stops.

Example of a failing query :
http://transit.land/api/v1/schedule_stop_pairs?origin_onestop_id=s-spey61hqnj-th%C3%89atrelacri%C3%89e,s-spey6d99hu-canebierereformes&date=today
while this works fine
http://transit.land/api/v1/schedule_stop_pairs?origin_onestop_id=s-spey61hqnj-th%C3%89atrelacri%C3%89e,s-spey6d99hu-canebierereformes&date=2019-04-19

Same with "now"
http://transit.land/api/v1/schedule_stop_pairs?origin_onestop_id=s-spey61hqnj-th%C3%89atrelacri%C3%89e,s-spey6d99hu-canebierereformes&origin_departure_between=now,now+1800
this works fine :
http://transit.land/api/v1/schedule_stop_pairs?origin_onestop_id=s-spey61hqnj-th%C3%89atrelacri%C3%89e,s-spey6d99hu-canebierereformes&origin_departure_between=16:00:00,16:30:00

The error I get is
{"message":"[NameError] uninitialized constant OnestopId::MODEL"}

I am wondering if this is related to a timezone definition issue ? As this is specified in the doc

For both of these options, a local timezone must be specified by providing one of the following parameters: origin_onestop_id, destination_onestop_id, or operator_onestop_id.

In my case both stops are located in the same timezone though.
Or maybe I'm doing something wrong 🤓

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

No branches or pull requests

1 participant