You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When integrating the work from #28 into my use case, I found that journeys between two local stations result in a JourneysArrivalDepartureTooNearError exception. As soon as one of the stations is a long-distance station, the journeys are retrieved, but seem to take a detour using a long-distance product.
With the DBProfile, this is not an issue.
I do not understand what is happening. But maybe it's more obvious to you. Here's a test script:
importdatetimefrompyhafasimportHafasClientfrompyhafas.profileimportKVBProfilekvb=HafasClient(KVBProfile())
# This works: Two long-distance stationsdepartures=kvb.locations('Köln Hbf')
destinations=kvb.locations('Bahnhof Deutz/Messe')
# This also works: Still one long-distance station# But: The journey takes a detour through Köln Hbf, although there is a direct stadtbahn connection.departures=kvb.locations('Köln Heumarkt')
# This breaks: Two local stations only# Result: pyhafas.types.exceptions.JourneysArrivalDepartureTooNearError: HAFAS Kernel: No connection founddestinations=kvb.locations('Deutzer Freiheit')
departure=departures[0]
destination=destinations[0]
print(departure)
print(destination)
journeys=kvb.journeys(
origin=departure,
destination=destination,
date=datetime.datetime.now(),
min_change_time=0,
max_changes=-1
)
print(journeys)
@1Maxnet1, I'm tagging you as the author of #28 . (Thanks again!) Maybe you have an idea?
The text was updated successfully, but these errors were encountered:
When integrating the work from #28 into my use case, I found that journeys between two local stations result in a
JourneysArrivalDepartureTooNearError
exception. As soon as one of the stations is a long-distance station, the journeys are retrieved, but seem to take a detour using a long-distance product.With the DBProfile, this is not an issue.
I do not understand what is happening. But maybe it's more obvious to you. Here's a test script:
@1Maxnet1, I'm tagging you as the author of #28 . (Thanks again!) Maybe you have an idea?
The text was updated successfully, but these errors were encountered: