"Expected just one assiagnment at this point" error when running data builder

12 views
Skip to first unread message

Brandon Perdue

unread,
Sep 26, 2024, 12:19:30 PMSep 26
to onebusaway-developers
Has anybody here ran into this on your OBA server?  When I try and pull in our most recent gtfs files we are getting the following error:

2024-09-26 08:59:36,032 INFO  [TripEntriesFactory.java:103] : route processed: 1/53
2024-09-26 08:59:36,032 INFO  [TripEntriesFactory.java:111] : trips to process: 563
2024-09-26 08:59:36,032 ERROR [DistanceAlongShapeLibrary.java:346] : expected just one assignment at this point, found 2; shapePoint=STA_51153,
possibleAssignments=
PointAndIndex(index=0, point=Point(466835.1061398075,5277817.50942819), distanceAlongShape=20.306629176449935, distanceFromTarget=5.891937225839789), PointAndIndex(index=12, point=Point(466493.46615282865,5277884.33913629), distanceAlongShape=843.874746197843, distanceFromTarget=342.31397620000325),
stopTime=
StopTimeEntry(Stop(STA_CAN4THSN:47.652904, -117.441721), trip=STA_1133438),
2024-09-26 08:59:36,044 ERROR [FederatedTransitDataBundleCreatorMain.java:211] : error building transit data bundle
java.lang.IllegalStateException: expected just one assignment at this point, found 2; shapePoint=STA_51153,
possibleAssignments=
PointAndIndex(index=0, point=Point(466835.1061398075,5277817.50942819), distanceAlongShape=20.306629176449935, distanceFromTarget=5.891937225839789), PointAndIndex(index=12, point=Point(466493.46615282865,5277884.33913629), distanceAlongShape=843.874746197843, distanceFromTarget=342.31397620000325),
stopTime=
StopTimeEntry(Stop(STA_CAN4THSN:47.652904, -117.441721), trip=STA_1133438),
        at org.onebusaway.transit_data_federation.bundle.tasks.transit_graph.DistanceAlongShapeLibrary.computeBestAssignment(DistanceAlongShapeLibrary.java:348)
        at org.onebusaway.transit_data_federation.bundle.tasks.transit_graph.DistanceAlongShapeLibrary.getDistancesAlongShape(DistanceAlongShapeLibrary.java:143)
        at org.onebusaway.transit_data_federation.bundle.tasks.transit_graph.StopTimeEntriesFactory.ensureStopTimesHaveShapeDistanceTraveledSet(StopTimeEntriesFactory.java:239)
        at org.onebusaway.transit_data_federation.bundle.tasks.transit_graph.StopTimeEntriesFactory.processStopTimes(StopTimeEntriesFactory.java:124)
        at org.onebusaway.transit_data_federation.bundle.tasks.transit_graph.TripEntriesFactory.processTrip(TripEntriesFactory.java:172)
        at org.onebusaway.transit_data_federation.bundle.tasks.transit_graph.TripEntriesFactory.processTrips(TripEntriesFactory.java:121)
        at org.onebusaway.transit_data_federation.bundle.tasks.transit_graph.TransitGraphTask.run(TransitGraphTask.java:103)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at com.sun.proxy.$Proxy73.run(Unknown Source)
        at org.onebusaway.transit_data_federation.bundle.FederatedTransitDataBundleCreator.run(FederatedTransitDataBundleCreator.java:202)
        at org.onebusaway.transit_data_federation.bundle.FederatedTransitDataBundleCreatorMain.run(FederatedTransitDataBundleCreatorMain.java:209)
        at org.onebusaway.transit_data_federation.bundle.FederatedTransitDataBundleCreatorMain.main(FederatedTransitDataBundleCreatorMain.java:88)


We did implement a headway management system on one of our routes recently, but that had been in an older version of our gtfs files that worked.  Aside from that we just went through a standard service change where we added a couple of routes and removed one.  We pull this same data into a few other platforms that don't seem to be having any issues with it.  Just OBA.

Sheldon A. Brown

unread,
Sep 26, 2024, 12:51:58 PMSep 26
to onebusaway...@googlegroups.com
When trying to map the stops to the shape for trip

STA_1133438

there was an ambiguous assignment. From the looks of it, it looks like the first and last stop for the given stop time are equally likely.

Review that trip for stops off the shape, stops times out of order, or duplicate stop times. This is a data issue.

Certain custom configurations of OBA can be tuned for this exception, told to ignore this exception, or self-correct for this exception. You don’t list the build you are using so I would focus on the data first.
Sent from my iPhone

> On Sep 26, 2024, at 12:19, 'Brandon Perdue' via onebusaway-developers <onebusaway...@googlegroups.com> wrote:
>
> STA_1133438

Devin Braun

unread,
Sep 30, 2024, 12:31:01 PMSep 30
to onebusaway...@googlegroups.com
Hi Brandon,

In looking at your stop_times.txt in your GTFS, I checked the trip_id that is being mentioned STA_1133438.  It only has one record.  Perhaps this is why the OBA bundle builder is having an issue?  I'm not sure it makes sense to have just one entry in stop_times.txt for a trip?  It doesn't know how to apply the shape to just one stop.

trip_id arrival_time departure_time stop_id stop_sequence stop_headsign pickup_type drop_off_type shape_dist_traveled timepoint
1133438 14:29:00 14:29:00 CAN4THSN 1 0 1 1

-Devin

--
You received this message because you are subscribed to the Google Groups "onebusaway-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onebusaway-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/onebusaway-developers/900694c4-6081-441c-9f16-8caaf003aee9n%40googlegroups.com.

Sheldon A. Brown

unread,
Sep 30, 2024, 1:51:51 PMSep 30
to onebusaway...@googlegroups.com
Good catch!  Indeed OBA requires two stops to consider a trip valid. 
Sent from my iPhone

On Sep 30, 2024, at 12:31, Devin Braun <devin...@gmail.com> wrote:



Brandon Perdue

unread,
Oct 2, 2024, 12:32:04 PMOct 2
to onebusaway-developers
Thanks for the help on this.  We are going to work with our software provider that is generating our gtfs files to see what options we have on getting that data fixed.
Reply all
Reply to author
Forward
0 new messages