Open Avonik opened 1 month ago
"dixTxt" seems to be used to determine the "direction" of the train. Since I dont use it for my case I fixed it by adding a check in the pard_station_board_request method
try:
direction = raw_leg['dirTxt']
except KeyError:
raw_leg['dirTxt'] = "Unknown Direction"
import datetime, csv import time
import pytz # Ensure you have pytz installed from pyhafas import HafasClient from pyhafas.profile import DBProfile, VSNProfile
client = HafasClient(DBProfile(), debug=True)
Trying to get the departures generates a Key Error in this specific case when encountering this substitution for a canceled train: