GTFS parser throws exception on Transfer.txt in Paris RATP data

101 views
Skip to first unread message

owen....@mxdata.co.uk

unread,
Jun 19, 2015, 4:52:33 AM6/19/15
to opentripp...@googlegroups.com
The GTFS parser throws an exception on the Paris RATP GTFS data when it reaches Transfer.txt, even when it's been told not to use them:

DEFAULT_SUBWAY_ACCESS_TIME = 2.0
htmlAnnotations = false
transit = true
useTransfersTxt = false
parentStopLinking = true
stationTransfers = true
subwayAccessTime = 2.0
streets = true
embedRouterConfig = true
areaVisibility = false
matchBusRoutesToStreets = false
fetchElevationUS = false
elevationBucket = null
fareServiceFactory = DefaultFareServiceFactory
customNamer = null
staticBikeRental = false
staticParkAndRide = true
staticBikeParkAndRide = false

.....

08:45:17.886 INFO (GraphBuilder.java:208) Found GTFS file /OTP/Data/RATP_GTFS_METRO_10.zip
08:45:18.352 INFO (GtfsModule.java:165) reading GTFS bundle at /OTP/Data/RATP_GTFS_METRO_10.zip
08:45:18.361 INFO (GtfsModule.java:179) reading entities: org.onebusaway.gtfs.model.Agency
08:45:18.393 INFO (GtfsModule.java:189) This Agency has the ID 100
08:45:18.393 INFO (GtfsModule.java:179) reading entities: org.onebusaway.gtfs.model.ShapePoint
08:45:18.396 INFO (GtfsModule.java:179) reading entities: org.onebusaway.gtfs.model.Route
08:45:18.403 INFO (GtfsModule.java:179) reading entities: org.onebusaway.gtfs.model.Stop
08:45:18.413 INFO (GtfsModule.java:179) reading entities: org.onebusaway.gtfs.model.Trip
08:45:18.494 INFO (GtfsModule.java:179) reading entities: org.onebusaway.gtfs.model.StopTime
08:45:19.247 INFO (GtfsModule.java:179) reading entities: org.onebusaway.gtfs.model.ServiceCalendar
08:45:19.255 INFO (GtfsModule.java:179) reading entities: org.onebusaway.gtfs.model.ServiceCalendarDate
08:45:19.262 INFO (GtfsModule.java:179) reading entities: org.onebusaway.gtfs.model.FareAttribute
08:45:19.263 INFO (GtfsModule.java:179) reading entities: org.onebusaway.gtfs.model.FareRule
08:45:19.264 INFO (GtfsModule.java:179) reading entities: org.onebusaway.gtfs.model.Frequency
08:45:19.264 INFO (GtfsModule.java:179) reading entities: org.onebusaway.gtfs.model.Pathway
08:45:19.265 INFO (GtfsModule.java:179) reading entities: org.onebusaway.gtfs.model.Transfer
Exception in thread "main" org.onebusaway.csv_entities.exceptions.CsvEntityIOException: io error: entityType=org.onebusaway.gtfs.model.Transfer path=transfers.txt lineNumber=2
        at org.onebusaway.csv_entities.CsvEntityReader.readEntities(CsvEntityReader.java:161)
        at org.onebusaway.csv_entities.CsvEntityReader.readEntities(CsvEntityReader.java:120)
        at org.onebusaway.csv_entities.CsvEntityReader.readEntities(CsvEntityReader.java:115)
        at org.onebusaway.csv_entities.CsvEntityReader.readEntities(CsvEntityReader.java:108)
        at org.opentripplanner.graph_builder.module.GtfsModule.loadBundle(GtfsModule.java:180)
        at org.opentripplanner.graph_builder.module.GtfsModule.buildGraph(GtfsModule.java:121)
        at org.opentripplanner.graph_builder.GraphBuilder.run(GraphBuilder.java:160)
        at org.opentripplanner.standalone.OTPMain.run(OTPMain.java:114)
        at org.opentripplanner.standalone.OTPMain.main(OTPMain.java:89)
Caused by: org.onebusaway.gtfs.serialization.EntityReferenceNotFoundException: entity reference not found: type=org.onebusaway.gtfs.model.Stop id=3813108
        at org.onebusaway.gtfs.serialization.GtfsReader.getAgencyForEntity(GtfsReader.java:212)
        at org.onebusaway.gtfs.serialization.GtfsReader$GtfsReaderContextImpl.getAgencyForEntity(GtfsReader.java:293)
        at org.onebusaway.gtfs.serialization.mappings.EntityFieldMappingImpl$ConverterImpl.convert(EntityFieldMappingImpl.java:104)
        at org.onebusaway.gtfs.serialization.mappings.EntityFieldMappingImpl.translateFromCSVToObject(EntityFieldMappingImpl.java:61)
        at org.onebusaway.csv_entities.IndividualCsvEntityReader.readEntity(IndividualCsvEntityReader.java:129)
        at org.onebusaway.csv_entities.IndividualCsvEntityReader.handleLine(IndividualCsvEntityReader.java:96)
        at org.onebusaway.csv_entities.CsvEntityReader.readEntities(CsvEntityReader.java:157)
        ... 8 more
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option UseStringCache; support was removed in 8.0
08:45:19.559 INFO (OTPServer.java:38) Wiring up and configuring server.
08:45:19.782 INFO (GraphScanner.java:81) Attempting to automatically register routerIds [Paris]
08:45:19.783 INFO (GraphScanner.java:82) Graph files will be sought in paths relative to /OTP/graphs
08:45:19.784 INFO (GraphService.java:190) Registering new router 'Paris'
08:45:19.785 INFO (InputStreamGraphSource.java:213) Loading graph...
08:45:19.786 ERROR (InputStreamGraphSource.java:218) Exception while loading graph 'Paris'.
java.io.EOFException
        at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2328)
        at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2797)
        at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:802)
        at java.io.ObjectInputStream.<init>(ObjectInputStream.java:299)
        at org.opentripplanner.routing.impl.InputStreamGraphSource.loadGraph(InputStreamGraphSource.java:215)
        at org.opentripplanner.routing.impl.InputStreamGraphSource.reload(InputStreamGraphSource.java:139)
        at org.opentripplanner.routing.services.GraphService.registerGraph(GraphService.java:197)
        at org.opentripplanner.routing.impl.GraphScanner.startup(GraphScanner.java:86)
        at org.opentripplanner.standalone.OTPMain.run(OTPMain.java:138)
        at org.opentripplanner.standalone.OTPMain.main(OTPMain.java:89)08:45:19.787 WARN (InputStreamGraphSource.java:150) Unable to load data for router 'Paris'.
08:45:19.787 WARN (GraphService.java:199) Can't register router ID 'Paris', no graph.

Andrew Byrd

unread,
Jun 19, 2015, 5:37:17 AM6/19/15
to owen....@mxdata.co.uk, opentripp...@googlegroups.com
Hi Owen,

This is one of the reasons I’ve written a replacement GTFS loader and we’re planning to replace the current one (from an external library). It throws unrecoverable exceptions for some relatively minor conditions, such as references to non-existing entities.

Unfortunately telling OTP not to use transfers.txt will not prevent the underlying library from loading it and throwing the error.

-Andrew

--
You received this message because you are subscribed to the Google Groups "OpenTripPlanner Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opentripplanner...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Laurent GRÉGOIRE

unread,
Jun 19, 2015, 5:48:59 AM6/19/15
to Andrew Byrd, owen....@mxdata.co.uk, opentripplanner-dev
Hi,

On 19 June 2015 at 11:37, Andrew Byrd <and...@fastmail.net> wrote:
> Unfortunately telling OTP not to use transfers.txt will not prevent the
> underlying library from loading it and throwing the error.

Otherwise a quick temporary fix would be to just remove the
transfers.txt file from the zip.

--Laurent

owen....@mxdata.co.uk

unread,
Jun 19, 2015, 6:13:17 AM6/19/15
to opentripp...@googlegroups.com, owen....@mxdata.co.uk
Hi Andrew,

That's good to hear, any idea on time scale for this?

Hi Laurent,

Yes, that's what we've done

Thanks all,
To unsubscribe from this group and stop receiving emails from it, send an email to opentripplanner-dev+unsub...@googlegroups.com.

Andrew Byrd

unread,
Jun 19, 2015, 6:25:49 AM6/19/15
to owen....@mxdata.co.uk, opentripp...@googlegroups.com
Hi Owen,

The GTFS loader itself is essentially finished (https://github.com/conveyal/gtfs-lib). “All that remains” is integration with OTP, but it’s quite hard to estimate how long that will take because it will have impacts throughout the codebase.

Unless someone from the wider OTP developer community is able to work on this, the transition is probably at least a few months away.

-Andrew

To unsubscribe from this group and stop receiving emails from it, send an email to opentripplanner...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages