Corrupted zip fares file from opendata

237 views
Skip to first unread message

Eugene Mikhalev

unread,
Feb 25, 2021, 2:49:33 AM2/25/21
to A gathering place for the Open Rail Data community
Does anyone have issues with https://opendata.nationalrail.co.uk/api/staticfeeds/2.0/fares ?

I've downloaded corrupted file every time (24, 25 Feb 2021). 
unzip /tmp/fares.zip 
Archive:  /tmp/fares.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.

Danny Withington

unread,
Feb 26, 2021, 5:39:58 AM2/26/21
to A gathering place for the Open Rail Data community
I've been encountering the same issue for the past few days now, unfortunately. 
The file I'm receiving is 29MB, which does seem a little smaller than usual.

Thanks, 
Danny

RailAleFan

unread,
Feb 26, 2021, 5:55:52 AM2/26/21
to A gathering place for the Open Rail Data community
2 iterations of zip -FF can extract all the complete files on the remote chance that's of any use to anyone...!

$zip -FF dtd.fares.zip --out dtd.fares.ff.zip
Fix archive (-FF) - salvage what can
        zip warning: Missing end (EOCDR) signature - either this archive
                     is not readable or the end is damaged
Is this a single-disk archive?  (y/n): y
  Assuming single-disk archive
Scanning for entries...
 copying: RJFAF857.TVL  (1924 bytes)
 copying: RJFAF857.TJS  (1057 bytes)
 copying: RJFAF857.TPB  (6099 bytes)
 copying: RJFAF857.TCL  (183 bytes)
 copying: RJFAF857.TRR  (21565 bytes)
 copying: RJFAF857.TPK  (857 bytes)
 copying: RJFAF857.RLC  (7542 bytes)
 copying: RJFAF857.RCM  (8449 bytes)
 copying: RJFAF857.DIS  (14847 bytes)
 copying: RJFAF857.FRR  (1488 bytes)
 copying: RJFAF857.TOC  (1557 bytes)
 copying: RJFAF857.TSP  (19204 bytes)
 copying: RJFAF857.TAP  (3062 bytes)
 copying: RJFAF857.FFL
        zip warning: no end of stream entry found: RJFAF857.FFL
        zip warning: rewinding and scanning for later entries


(then for some reason you need to run zip -FF again on the out file which turns that into a working archive)

Danny Withington

unread,
Feb 26, 2021, 2:06:52 PM2/26/21
to A gathering place for the Open Rail Data community
Thanks RailAleFan,

Tried this, and it worked a treat, but as you say, it only recovers the compete files.   Hopefully it'll get fixed soon.

Cheers,
Danny.

Danny Withington

unread,
Mar 2, 2021, 3:40:54 AM3/2/21
to A gathering place for the Open Rail Data community
For those interested, I've just obtained a full (and non-corrupt) fares zip file via the usual means - https://opendata.nationalrail.co.uk/api/staticfeeds/2.0/fares

Cheers,
Danny 
Message has been deleted

Eugene Mikhalev

unread,
Sep 28, 2021, 8:49:01 AM9/28/21
to A gathering place for the Open Rail Data community
We have been encountering the same issue again for the last few days. The fares file is corrupted. Is anybody encountering the same? 
Reply all
Reply to author
Forward
0 new messages