Here are some intial problems I have found with this set of calls. I am using /Line/Route (no parameters) to generate a list of line/originating stop/direction entries and then iterating through that set.
First off, a repeat of a comment that’s been made elsewhere in the forum. The optional direction parameter is necessary for disambiguation in a number of cases but is totally undocumented in Swagger.
Next, all rail-related calls (including london-overground and tfl-rail) return a set where the stations and stops sections are populated, but the timetable section isn’t. The statusErrorMessage for all of these is ‘The stop you selected has now been removed from the route, and therefore we cannot show you a timetable. The route page will be updated shortly to reflect these changes.’
The same problem occurs with the following bus routes:
75/490001177Z/outbound
75/490006706C13/inbound
434/40004410113A/inbound
e11/490007441H/outbound
There are two rail sections that fail ‘HTTP error 400 Bad Request’, these are:
cross-country/0000BRSTLTM1/inbound
south-western-railway/0000BKNHRST1/outbound
It looks to me as if you are including the TIPLOC suffix as part of the code and then failing to translate it to a NAPTAN code.
The following entries fail ‘HTTP error 500 Internal Server Error’:
139/490000087GF/outbound
e1/490007441H/outbound
n53/490019475P/inbound
r7/490005081Z/outbound
There are also a number of entries where the originator, derived from /Line/Route does not match the departureStopId in the timetable, these are:
24/490015832E/outbound departure stop 490011003E does not match originator
40/490006232W1/outbound departure stop 490015428N does not match originator
108/490018554E1/outbound departure stop 490018554E does not match originator
134/490000252E/inbound departure stop 490000252X does not match originator
162/490001018A/outbound departure stop 490015222D does not match originator
221/490015287E/outbound departure stop 490000070A does not match originator
223/490000256/inbound departure stop 490000256F does not match originator
240/490015287E/inbound departure stop 490000070A does not match originator
241/490013802W/inbound departure stop 490003750M does not match originator
294/490007917E/outbound departure stop 490007917W does not match originator
371/490018720S/outbound departure stop 490018720W does not match originator
404/490005640G/outbound departure stop 490005637C does not match originator
474/490013802W/outbound departure stop 490003750M does not match originator
483/490015231T/outbound departure stop 490015230P does not match originator
b12/490012799E/inbound departure stop 490012799W does not match originator
k1/490007205S/inbound departure stop 490007205N does not match originator
n83/490015231T/inbound departure stop 490015230P does not match originator
n97/490013767X/inbound departure stop 490013767S does not match originator
r5/490007494PA/inbound departure stop 490007494DC does not match originator
r10/490007494PA/inbound departure stop 490007494DC does not match originator
In most cases the departure stop is the second stop shown in the corresponding /Line/Route/Sequence call (4th in the case of lines 223 & 404 and considerably later for lines B12, R5 & R10). In all cases this appears to be caused by the route having a subsequent stop in the same NAPTAN group
All these comments are based on the update dated 8/8/2019
No timetable: all rail, 75, 434 as before, e11 fixed, 197/490015223C10/inbound added
Error 400: as before
Error 500: all fixed
Mismatched departure stop: as before
Additionally, hereast-shuttle/490001338Z/outbound has stations, stops and schedules, but no stationIntervals. The intervalId for all knownJourneys is -1.
No timetable: all rail, 75, 197, 434 as before, 195/490004289C/inbound added
Error 400: thameslink/9100GCAMBNTH0/inbound
Error 500: 68/490000077E/inbound and n38/490014050D/inbound
Mismatched departure stops: as before, add
Timetable 44/490000248G/outbound departure stop 490014050R does not match originator
Result of update dated 30/8/2019 (published 2/9/2019):
No timetable: all rail and:
No route sections for 75/490001177Z/outbound
No route sections for 75/490006706C13/inbound
No route sections for 434/40004410113A/inbound
Error 400:
Error loading timetable data for thameslink/9100CAMBNTH0/outbound: ##HTTP 400 Bad Request
Error 500:
Error loading timetable data for 160/490001249F/inbound: ##HTTP 500 Internal Server Error
Error loading timetable data for e9/490007913E/inbound: ##HTTP 500 Internal Server Error
Error loading timetable data for n277/490008507N2/inbound: ##HTTP 500 Internal Server Error
Mismatched departure stops:
Timetable 24/490015832E/outbound departure stop 490011003E does not match originator
Timetable 40/490006232W1/outbound departure stop 490015428N does not match originator
Timetable 44/490000248G/outbound departure stop 490014050R does not match originator
Timetable 108/490018554E1/outbound departure stop 490018554E does not match originator
Timetable 134/490000252E/inbound departure stop 490000252X does not match originator
Timetable 162/490001018A/outbound departure stop 490015222D does not match originator
Timetable 221/490015287E/outbound departure stop 490000070A does not match originator
Timetable 223/490000256/inbound departure stop 490000256F does not match originator
Timetable 240/490015287E/inbound departure stop 490000070A does not match originator
Timetable 241/490013802W/inbound departure stop 490003750M does not match originator
Timetable 294/490007917E/outbound departure stop 490007917W does not match originator
Timetable 371/490018720S/outbound departure stop 490018720W does not match originator
Timetable 404/490005640G/outbound departure stop 490005637C does not match originator
Timetable 474/490013802W/outbound departure stop 490003750M does not match originator
Timetable 483/490015231T/outbound departure stop 490015230P does not match originator
Timetable 686/49000012262N/outbound departure stop 490012662E does not match originator
Timetable b12/490012799E/inbound departure stop 490012799W does not match originator
Timetable k1/490007205S/inbound departure stop 490007205N does not match originator
Timetable n83/490015231T/inbound departure stop 490015230P does not match originator
Timetable n97/490013767X/inbound departure stop 490013767S does not match originator
Timetable r5/490007494PA/inbound departure stop 490007494DC does not match originator
Timetable r10/490007494PA/inbound departure stop 490007494DC does not match originator
Error loading timetable data for cross-country/0000BRSTLTM1/inbound: ##HTTP 400 Bad Request
Error loading timetable data for south-western-railway/0000BKNHRST1/outbound: ##HTTP 400 Bad Request
Error 500:
none
Mismatched departure stops:
as previous
No interval sets:
Timetable hereeast-shuttle/490001338Z/outbound: no interval sets
No timetable: all rail, including london-overground and tfl-rail, as well as the ones shown below
Errors from my logs - note that HTTP errors are after multiple retries:
Timetable 24/490015832E/outbound departure stop 490011003E does not match originator
Timetable 40/490006232W1/outbound departure stop 490015428N does not match originator
Timetable 44/490000248G/outbound departure stop 490014050R does not match originator
Timetable 108/490018554E1/outbound departure stop 490018554E does not match originator
Timetable 134/490000252E/inbound departure stop 490000252X does not match originator
Timetable 162/490001018A/outbound departure stop 490015222D does not match originator
Timetable 221/490015287E/outbound departure stop 490000070A does not match originator
Timetable 223/490000256/inbound departure stop 490000256F does not match originator
Timetable 240/490015287E/inbound departure stop 490000070A does not match originator
Timetable 241/490013802W/inbound departure stop 490003750M does not match originator
Timetable 294/490007917E/outbound departure stop 490007917W does not match originator
Timetable 371/490018720S/outbound departure stop 490018720W does not match originator
Timetable 404/490005640G/outbound departure stop 490005637C does not match originator
Timetable 474/490013802W/outbound departure stop 490003750M does not match originator
Timetable 483/490015231T/outbound departure stop 490015230P does not match originator
Timetable 686/49000012262N/outbound departure stop 490012662E does not match originator
Timetable b12/490012799E/inbound departure stop 490012799W does not match originator
Timetable k1/490007205S/inbound departure stop 490007205N does not match originator
Timetable n83/490015231T/inbound departure stop 490015230P does not match originator
Timetable n97/490013767X/inbound departure stop 490013767S does not match originator
Timetable r5/490007494PA/inbound departure stop 490007494DC does not match originator
Timetable r10/490007494PA/inbound departure stop 490007494DC does not match originator
No route sections for 52/490014050C/outbound: The stop you selected has now been removed from the route, and therefore we cannot show you a timetable. The route page will be updated shortly to reflect these changes.
No route sections for 75/490001177Z/outbound: The stop you selected has now been removed from the route, and therefore we cannot show you a timetable. The route page will be updated shortly to reflect these changes.
No route sections for 75/490006706C13/inbound: The stop you selected has now been removed from the route, and therefore we cannot show you a timetable. The route page will be updated shortly to reflect these changes.
No route sections for 95/490012241N/outbound: The stop you selected has now been removed from the route, and therefore we cannot show you a timetable. The route page will be updated shortly to reflect these changes.
No route sections for 185/490000248YZ/inbound: The stop you selected has now been removed from the route, and therefore we cannot show you a timetable. The route page will be updated shortly to reflect these changes.
No route sections for 419/490003632BF/inbound: The stop you selected has now been removed from the route, and therefore we cannot show you a timetable. The route page will be updated shortly to reflect these changes.
No route sections for 434/40004410113A/inbound: The stop you selected has now been removed from the route, and therefore we cannot show you a timetable. The route page will be updated shortly to reflect these changes.
No route sections for westminster-passenger-service-association/930GWMR/outbound: The stop you selected has now been removed from the route, and therefore we cannot show you a timetable. The route page will be updated shortly to reflect these changes.
Error loading timetable data for cross-country/0000BRSTLTM1/inbound: ##HTTP 400 Bad Request
Error loading timetable data for south-western-railway/0000BKNHRST1/outbound: ##HTTP 400 Bad Request
Error loading timetable data for 640/490000211F/outbound: ##HTTP 500 Internal Server Error
Error loading timetable data for e8/490013259U/outbound: ##HTTP 503 Service Unavailable
Timetable hereeast-shuttle/490001338Z/outbound: no interval sets
No interval entries: Circle, Hammersmith & City, Metropolitan/inbound
DLR/inbound: no entries for Poplar/West India Quay-Bank/Tower Gateway, Beckton-Canning Town & Canning Town-Poplar have no intermediate stops
DLR/outbound: Bank/Tower Gateway-Canary Wharf/Poplar and Poplar-Canning Town have no intermediate stops, no entries for Canning Town-Beckton
Metropolitan/outbound: only Amersham/Chesham-Rickmansworth, Chesham-Watford & Watford-Croxley
@nickp I’ve made a start and my notes on your first post are below:
Optional Swagger Direction
Already raised under SVC-3456 - it’s been sitting on the backlog for a while now and I’ll see if this can be prioritised into a development sprint.
London Overground & TfL Rail
I’m not sure why, but we’ve never had the ability to query National Rail (inc LO/TfL Rail) timetables using the timetable API we have in the Journey Planner. I’ll take a look into if this is possible. However, it may be some time before we can expose this via the Unified API.
Buses - Stop removed from route
75/490001177Z/outbound - appears fixed
75/490006706C13/inbound - appears fixed
434/40004410113A/inbound - seems like there is a mismatch in the data provided by Surrey County Council to the NaPTAN and the data provided by TfL Surface Transport. We will investigate under SVC-6890
e11/490007441H/outbound - appears fixed
Rail - 0000 prefixes
These routes are imported from National Rail data. I’ve found another routesection affected (Waterloo - Westbury, Wilts) but there. I’ve raised SVC-6891 to investigate this.
This seems to be driven from when 2 stops on the route exist in the same StopArea (NaPTAN) or HUB area (Unified API). I’ve raised ticket SVC-6892 to look into why the latter stop is being returned as the departureStopId.
I dont know where National Rail’s TIPLOC codes are converted to NAPTAN codes by the addition of a 910G prefix but, as I mentioned previously, this appears to be caused by the inclusion of the platform number in the code before lookup/conversion. As well as their inclusion in the timetable data, there are 63 of these ‘0000’ codes in the /Line/Route/Sequence data
Rail - including LO/TflRail
Although you say that the API has historically not had access to this data, /Line/Route (no parameters) nevertheless returns a list of potential starting points for all the rail services, so there is some data present to cause this, it’s only the detail calls that get the rejection message. As a simple example, the following locations are returned for c2c:
c2c/910GFENCHRS/outbound
c2c/910GLIVST/outbound
c2c/910GSHBRYNS/inbound
As well as all the problems detailed above, route 192/outbound has the last stop (Tottenham Hale Bus Station/490009917AP) duplicated. This does not appear in /Line/Route/Sequence
Edit:
A little bit of defensive coding later, we find:
Stop 490000054CA skipped, same as previous in 125/outbound/0
Stop 490009917AP skipped, same as previous in 192/outbound/0
Stop 40004402075A skipped, same as previous in 203/inbound/0
Stop 490015719S skipped, same as previous in 366/outbound/0
Stop 490011630S2 skipped, same as previous in 366/outbound/0
Stop 490011630S2 skipped, same as previous in 366/outbound/1
Stop 490004992E skipped, same as previous in 497/inbound/0
Stop 490000500Y skipped, same as previous in b13/inbound/0
It’s getting worse - there are 627 Error 500 returns after the updated dated 4/5/2020
–Edit-- still true after rollback, followed by update dated 5/5/2020
The total this time is 614 - this represents over a third of all the 1820 requests made (plus another 50+ errors along the lines documented in previous posts)
We’ve been experiencing some issues with the timetable back-end recently returning 5xx codes. We believe it partly to be load-related so I’d suggest throttling the rate of your requests and hopefully that will provide a more reliable set of results.
I’ll keep you updated on the progress of a fix here.
I’ll give it a go with a tick delay in place and report back. I just note in passing that this is the same code that I use for /Line/Route/Sequence downloads with no such problems there.
Ok, I’ve tried this with both a 1-second and a 3-second tick delay, with no significant improvement. Here’s the start of my log for the 3-second run, showing the results.
Each ‘… pause n’ line is my tick delay in operation. Additionally, each ‘…retrying…’ also has a built-in 3-second delay. Just to emphasise the point, this has been working reasonably, barring all the errors mentioned above, until a couple of weeks ago.
Back to your end, James.
Regards
Nick
Log extract:
Line/1/Timetable/490004733C?direction=inbound
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/2/Timetable/490000145L?direction=outbound paused 3
Line/2/Timetable/490010444W?direction=inbound paused 3
Line/3/Timetable/490005869D?direction=inbound paused 3
Line/3/Timetable/490019475P?direction=outbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/4/Timetable/490000008NW?direction=outbound paused 3
Line/4/Timetable/490000023BA?direction=inbound paused 3
Line/5/Timetable/490000039F?direction=inbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/5/Timetable/490011659E?direction=outbound paused 3
Line/6/Timetable/490003193R?direction=inbound paused 3
Line/6/Timetable/490003935Z?direction=outbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/7/Timetable/490000173OQ?direction=inbound paused 3
Line/7/Timetable/490015061O?direction=outbound paused 3
Line/8/Timetable/490000235Z?direction=inbound paused 3
Line/8/Timetable/490004215M?direction=outbound paused 3
Line/9/Timetable/490003193R?direction=outbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/9/Timetable/490007705G?direction=inbound paused 3
Line/11/Timetable/490007057R?direction=outbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/11/Timetable/490012391S?direction=inbound paused 3
Line/12/Timetable/490000173RF?direction=outbound paused 3
Line/12/Timetable/490006652N?direction=inbound paused 3
Line/13/Timetable/490000248ZZ?direction=inbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/13/Timetable/490015443P?direction=outbound paused 3
Line/14/Timetable/490000200E?direction=inbound paused 3
Line/14/Timetable/490003794O?direction=inbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/14/Timetable/490011285E2?direction=outbound paused 3
Line/15/Timetable/490002018P?direction=outbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/15/Timetable/490013766F?direction=inbound paused 3
Line/16/Timetable/490000248ZZ?direction=inbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/16/Timetable/490010015S1?direction=outbound paused 3
Line/17/Timetable/490000008R?direction=outbound paused 3
Line/17/Timetable/490000139A?direction=inbound paused 3
Line/18/Timetable/490000077E?direction=inbound paused 3
Line/18/Timetable/490003597G?direction=outbound paused 3
Line/19/Timetable/490000083G?direction=outbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/19/Timetable/490003683N?direction=inbound paused 3
Line/20/Timetable/1500IM1055?direction=inbound paused 3
Line/20/Timetable/490000249B?direction=outbound paused 3
Line/21/Timetable/490009105U?direction=outbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/21/Timetable/490015396S?direction=inbound paused 3
Line/22/Timetable/490000173RF?direction=inbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/22/Timetable/490011281N?direction=outbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/23/Timetable/490007419C?direction=outbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/23/Timetable/490007705G?direction=inbound paused 3
Line/24/Timetable/490012280A?direction=inbound paused 3
Line/24/Timetable/490015832E?direction=outbound paused 3
Line/25/Timetable/490007657V?direction=inbound paused 3
Line/25/Timetable/490008275K?direction=outbound paused 3
Line/26/Timetable/490000254QA?direction=inbound paused 3
Line/26/Timetable/490008264S?direction=outbound paused 3
Line/27/Timetable/490000097T?direction=outbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/27/Timetable/490004962W?direction=inbound paused 3
Line/28/Timetable/490009631N?direction=inbound paused 3
Line/28/Timetable/490012622S?direction=outbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/29/Timetable/490013767C?direction=inbound paused 3
Line/29/Timetable/490015567G2?direction=outbound paused 3
Line/30/Timetable/490011133M?direction=outbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/30/Timetable/490014662W?direction=inbound paused 3
Line/31/Timetable/490003375WK?direction=inbound paused 3
Line/31/Timetable/490003698W?direction=outbound paused 3
Line/32/Timetable/490000070D?direction=outbound paused 3
Line/32/Timetable/490000127KA?direction=inbound paused 3
Line/33/Timetable/490005445D?direction=outbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/33/Timetable/490009353S?direction=inbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/34/Timetable/490003634G?direction=outbound paused 3
Line/34/Timetable/490014164D?direction=inbound paused 3
Line/35/Timetable/490009843G?direction=outbound paused 3
Line/35/Timetable/490012113N?direction=inbound paused 3
Line/36/Timetable/490005345C?direction=outbound paused 3
Line/36/Timetable/490010204K?direction=inbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/37/Timetable/490010877E?direction=inbound paused 3
Line/37/Timetable/490011285E2?direction=outbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/38/Timetable/490009035E?direction=outbound paused 3
Line/38/Timetable/490014050D?direction=inbound paused 3
Line/39/Timetable/490000184Z?direction=outbound paused 3
Line/39/Timetable/490009843G?direction=inbound paused 3
Line/40/Timetable/490006232W1?direction=outbound paused 3
Line/40/Timetable/490015104S?direction=inbound paused 3
Line/41/Timetable/490000008Z?direction=outbound paused 3
Line/41/Timetable/490009917C?direction=inbound paused 3
Line/42/Timetable/490006336N?direction=outbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
Line/42/Timetable/490012391S?direction=inbound paused 3
Line/43/Timetable/490000139C?direction=inbound paused 3
Line/43/Timetable/490016643W?direction=outbound paused 3
Line/44/Timetable/490001296N?direction=inbound paused 3
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error
…retrying…
Error 500 Internal Server Error