Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

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

@elsa-pato

Description

@elsa-pato

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 🤓

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions