[iRail] another time bug

Pieter Colpaert pieter.colpaert at okfn.org
Tue Nov 24 13:05:12 UTC 2015


Hi Christophe,

Linking a station name to a specific ID is a problem we've been trying 
to fix decently the last 5 years: station names can come in a lot of 
different variants, different encodings, shortened differently, 
different languages and so on. In order to do this properly for the 600 
stations, we worked out a workflow at https://github.com/irail/stations 
with tests which enables one to test certain edge cases against the name 
→ identifier code.

It's the best thing we've been able to come up with in the last 5 years. 
Using a static list doesn't work as the NMBS website and different 
sources use different ad-hoc ways of building station lists. E.g., 
something breaking more recently was the fact that all of a suddent in 
English, "Brussel Zuid/Bruxelles Midi" changed to "Bru.-Zuid/Bru.-Midi". 
Parsing this is just a pain we have to deal with :)

Kind regards,

Pieter

On 24-11-15 14:00, C. Versieux wrote:
> Isn't there a way to get the station name by default without having to 
> manually fill all of them?
>
>
> On Tue, Nov 24, 2015 at 1:58 PM, Pieter Colpaert 
> <pieter.colpaert at okfn.org <mailto:pieter.colpaert at okfn.org>> wrote:
>
>     Hi Brecht,
>
>     In production, yet it still doesn't work I'm afraid
>
>     Pieter
>
>
>     On 24-11-15 13:55, Brecht Van de Vyvere wrote:
>>     Hi Pieter
>>
>>     The last URL should work with this fix:
>>     https://github.com/iRail/stations/pull/79
>>     Forgot to check that one ;)
>>
>>     Happy to help!
>>
>>     Brecht
>>
>>     ------------------------------------------------------------------------
>>     Subject: Re: [iRail] another time bug
>>     To: br5cht at hotmail.com <mailto:br5cht at hotmail.com>;
>>     christophe.versieux at gmail.com <mailto:christophe.versieux at gmail.com>
>>     CC: irail at list.irail.be <mailto:irail at list.irail.be>
>>     From: pieter.colpaert at okfn.org <mailto:pieter.colpaert at okfn.org>
>>     Date: Tue, 24 Nov 2015 11:28:47 +0100
>>
>>     Hi Brecht,
>>
>>     I've merged your PR and put it in production. Thank you a lot for
>>     tracking down the issues. It's funny how such small changes can
>>     cause a fix :)
>>
>>     All URLs work, except for the last one... could you check what's
>>     not working with
>>     http://api.irail.be/vehicle.php/?id=4891&lang=fr&date=091115&time=2010&format=JSON
>>     still?
>>
>>     Thanks!
>>
>>     Pieter
>>
>>     On 24-11-15 11:23, Brecht Van de Vyvere wrote:
>>
>>         Thanks Christophe!
>>
>>         Found out it's a dataproblem: it throws an exception when a
>>         station is not found, or the alternative name is not known.
>>
>>         Made a PR (https://github.com/iRail/stations/pull/78) which
>>         should fix the problem of these URLs.
>>
>>         Kind regards
>>         Brecht
>>
>>         ------------------------------------------------------------------------
>>         Date: Tue, 24 Nov 2015 09:55:32 +0100
>>         Subject: Re: [iRail] another time bug
>>         From: christophe.versieux at gmail.com
>>         <mailto:christophe.versieux at gmail.com>
>>         To: br5cht at hotmail.com <mailto:br5cht at hotmail.com>
>>         CC: irail at list.irail.be <mailto:irail at list.irail.be>;
>>         pieter.colpaert at okfn.org <mailto:pieter.colpaert at okfn.org>
>>
>>         Hi,
>>
>>         Here some of previous failures reported by email:
>>
>>         http://api.irail.be/vehicle.php/?id=112&lang=fr&date=171115&time=1144&format=JSON
>>         http://api.irail.be/vehicle.php/?id=2305&lang=fr&date=161115&time=0654&format=JSON
>>         http://api.irail.be/vehicle.php/?id=4891&lang=fr&date=091115&time=2010&format=JSON
>>
>>         On Tue, Nov 24, 2015 at 9:47 AM, Brecht Van de Vyvere
>>         <br5cht at hotmail.com <mailto:br5cht at hotmail.com>> wrote:
>>
>>             Hi
>>
>>             It looks like the problem occurs mostly when requesting
>>             an English version.
>>
>>             I made an issue for this:
>>             https://github.com/iRail/iRail/issues/128
>>
>>             Can someone give me a list of previous failures so I can
>>             check on those while fixing the code?
>>
>>             Kind regards
>>             Brecht
>>
>>             To: irail at list.iRail.be <mailto:irail at list.iRail.be>
>>             > From: pieter at iRail.be <mailto:pieter at iRail.be>
>>             > Date: Mon, 23 Nov 2015 21:29:21 +0100
>>             > Subject: Re: [iRail] another time bug
>>
>>             >
>>             > Hi Jan,
>>             >
>>             > We do have logging, yet we don't have the people that
>>             can keep tracking
>>             > down each separate case and debug it.
>>             >
>>             > On the one hand, if you, or someone you know, is up for
>>             it, feel free to
>>             > check out https://github.com/iRail/iRail (it's easy to
>>             set up locally)
>>             > and check out the errors that happen in the BeTrains
>>             app. Mostly they're
>>             > errors while parsing the HTML of SNCB, which may happen
>>             when they change
>>             > their website slightly.
>>             >
>>             > On the other hand, I would love to pay someone on iRail
>>             to do the long
>>             > list of TODOs piled up in the repos... If only we had a
>>             million moneys ;-)
>>             >
>>             > Kind regards,
>>             >
>>             > Pieter
>>             >
>>             > On 23-11-15 20:45, Jan Fabry wrote:
>>             > > Do we have any logging at the server in case these
>>             errors happen? 502 errors indicate it should be something
>>             on the server, so we should be able to resolve them (or
>>             convert them to a 4xx error if it’s due to the client).
>>             > >
>>             > > Regards,
>>             > >
>>             > > Jan
>>             > >
>>             > >> On 23 Nov 2015, at 19:23, C. Versieux
>>             <christophe.versieux at gmail.com
>>             <mailto:christophe.versieux at gmail.com>> wrote:
>>             > >>
>>             > >> Hello iRail team,
>>             > >>
>>             > >> I have noticed a lot of reports "Error 502, Could
>>             not get data. Please report this problem to
>>             iRail at list.iRail.be <mailto:iRail at list.iRail.be>." from
>>             the API by the feedback of users.
>>             > >> Alexander (in copy) also sent me a report that lead
>>             to this url:
>>             http://api.irail.be/vehicle.php/?id=1768&lang=en&date=231115&time=1910&format=JSON
>>             > >>
>>             > >> I guess that today was a special day, which might
>>             explain some issues, but is there something we can do to
>>             avoid such issues?
>>             > >> All these trains work perfectly in the SNCB/NMBS
>>             website, and these errors 502 seem very common.
>>             > >>
>>             > >> Do you need more data? Is there something we can do
>>             to help?
>>             > >>
>>             > >> Thank a lot for your feedback.
>>             > >>
>>             > >>
>>             > >>
>>             > >> On Mon, Nov 23, 2015 at 6:03 PM, Кондрашёв Александр
>>             <alexandrcfif at yandex.ru <mailto:alexandrcfif at yandex.ru>>
>>             wrote:
>>             > >> Hi !
>>             > >> Now I tried to check full route of other train, have
>>             the same issue - "check your internet connection "
>>             > >> Cheers! Alexander
>>             > >>
>>             > >> _______________________________________________
>>             > >> iRail mailing list
>>             > >> iRail at list.iRail.be <mailto:iRail at list.iRail.be>
>>             > >> https://lists.okfn.org/mailman/listinfo/irail
>>             > > _______________________________________________
>>             > > iRail mailing list
>>             > > iRail at list.iRail.be <mailto:iRail at list.iRail.be>
>>             > > https://lists.okfn.org/mailman/listinfo/irail
>>             >
>>             > _______________________________________________
>>             > iRail mailing list
>>             > iRail at list.iRail.be <mailto:iRail at list.iRail.be>
>>             > https://lists.okfn.org/mailman/listinfo/irail
>>
>>
>>
>>     -- 
>>     +32 486 74 71 22 <tel:%2B32%20486%2074%2071%2022>
>>
>>     Board of directors
>>     Open Knowledge Belgium
>>     http://openknowledge.be
>>
>>     International Open Transport community
>>     http://transport.okfn.org
>>
>>     Belgian Open Transport community
>>     http://transport.openknowledge.be
>>
>>
>>     _______________________________________________
>>     iRail mailing list
>>     iRail at list.iRail.be <mailto:iRail at list.iRail.be>
>>     https://lists.okfn.org/mailman/listinfo/irail
>
>
>     -- 
>     +32 486 74 71 22 <tel:%2B32%20486%2074%2071%2022>
>
>     Board of directors
>     Open Knowledge Belgium
>     http://openknowledge.be
>
>     International Open Transport community
>     http://transport.okfn.org
>
>     Belgian Open Transport community
>     http://transport.openknowledge.be
>
>
>     _______________________________________________
>     iRail mailing list
>     iRail at list.iRail.be <mailto:iRail at list.iRail.be>
>     https://lists.okfn.org/mailman/listinfo/irail
>
>
>
>
> _______________________________________________
> iRail mailing list
> iRail at list.iRail.be
> https://lists.okfn.org/mailman/listinfo/irail


-- 
+32 486 74 71 22

Board of directors
Open Knowledge Belgium
http://openknowledge.be

International Open Transport community
http://transport.okfn.org

Belgian Open Transport community
http://transport.openknowledge.be

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/irail/attachments/20151124/0497d551/attachment-0003.html>


More information about the iRail mailing list