Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partially canceled trains #517

Open
koeleboe opened this issue May 1, 2024 · 8 comments
Open

Partially canceled trains #517

koeleboe opened this issue May 1, 2024 · 8 comments

Comments

@koeleboe
Copy link

koeleboe commented May 1, 2024

There is again an issue with partially canceled trains. This happens for L886. It departs from Dendermonde, but the API says that the vehicle is not found in GTFS.
https://api.irail.be/v1/vehicle/?id=886

Another example: IC2614

requestId="9bf08fb6-26a7-4dc5-898b-ed7f2f170fd8">

@koeleboe
Copy link
Author

koeleboe commented May 1, 2024

Another issue, L892 has some cancelled stops between Ghent and Kortrijk. The journey and liveboard do show this, but the vehicle call not. All stops are served according to it. (Or the data iw not yet updatet).
https://api.irail.be/v1/vehicle/?id=892

Screenshot_20240501_223953_Samsung Internet
api.irail.PDF

Bertware added a commit that referenced this issue May 1, 2024
…ancelled, move all fixtures to structured folder
@Bertware
Copy link
Member

Bertware commented May 1, 2024

Hmm, seems like different ways to cancel a train conflict with each other when it comes to representing the cancelled state. I captured the raw data and added a test which is currently failing, will see if I can fix it tomorrow without breaking (the test for) the other recent fix to partially cancelled trains.

@Bertware
Copy link
Member

Bertware commented May 1, 2024

There is again an issue with partially canceled trains. This happens for L886. It departs from Dendermonde, but the API says that the vehicle is not found in GTFS. https://api.irail.be/v1/vehicle/?id=886

Another example: IC2614

NMBS described this journey in their GTFS as 4 different segments, which iRail puts together to Mechelen - Kortrijk, but when looking up L886 for Mechelen - Kortrijk the NMBS API returns "no results". When searching for the last segment, Ghent - Kortijk, the entire journey is returned. Will add a retry logic with different segments.

Bertware added a commit that referenced this issue May 1, 2024
@Bertware
Copy link
Member

Bertware commented May 1, 2024

There is again an issue with partially canceled trains. This happens for L886. It departs from Dendermonde, but the API says that the vehicle is not found in GTFS. https://api.irail.be/v1/vehicle/?id=886
Another example: IC2614

NMBS described this journey in their GTFS as 4 different segments, which iRail puts together to Mechelen - Kortrijk, but when looking up L886 for Mechelen - Kortrijk the NMBS API returns "no results". When searching for the last segment, Ghent - Kortijk, the entire journey is returned. Will add a retry logic with different segments.

Fixed: https://api.irail.be/v1/vehicle/?id=886&date=010524
https://api.irail.be/v1/vehicle/?id=ic2614&date=010524 still includes the canceled-flag, so the fix is working as it should on partially canceled trains

@koeleboe
Copy link
Author

koeleboe commented May 2, 2024

It doesnt seem to be fixed. S10 3887 has been canceled between Opwijk and Dendermonde, while the API shows the stops. Fore some reason, the request doesnt work (gives an error, but hyperrail shows the train🙃, probably it was cache). Previous version of the API handled this correctly.

<error code="500" requestId="9bf299db-09ff-4a62-b420-bd46bdf1c648">This request failed. Please check your query. Error code SVC_PARAM

Screenshot_20240502_170800_Samsung Internet

@Bertware
Copy link
Member

Bertware commented May 2, 2024

It doesnt seem to be fixed. S10 3887 has been canceled between Opwijk and Dendermonde, while the API shows the stops. Fore some reason, the request doesnt work (gives an error, but hyperrail shows the train🙃, probably it was cache)
It was the cache. Fetching a vehicle consists of 3 steps: finding the origin/destination in the GTFS data, fetching a journey id, and fetching the vehicle. The journey id was being cached for 6 hours, since these things don't change (or so I believed) but apparently they do, even though the query is specific for a vehicle between stops on a given date. This reference (which is no longer valid) then caused an error in the next step, which was the error iRail showed.

The "Fixed" part was only regarding these specific trains not being able to be fetched due to the differences in the GTFS structure, the actual cancelled/not cancelled state is not fixed yet (but this train seems to show up correctly with a fresh cache)

Bertware added a commit that referenced this issue May 2, 2024
…ancelled, move all fixtures to structured folder
@koeleboe
Copy link
Author

Issue happened again today with S10 3868. It ran directly from Dendermonde to Jette, skipping stations between. The api doesn't show the stops as cancelled

@koeleboe
Copy link
Author

koeleboe commented May 28, 2024

@Bertware happens again with S53 662. Train is rerouted between Oudenaarde and Gent, but the stops between are not cancelled. With the journeyplanner, you dont have the option to go to an intermediate stop (which is correct), but the vehicle call doesn't show the cancelled stops. Moreover, there is a platform in de pinte '606'. On the liveboard of "Eke-Nazareth" train is also cancelled, but just not in thd vehicle call

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants