skinkie / reference

Personal repository where I collect working examples to understand inner workings while building PyNeTExConv
GNU Affero General Public License v3.0
0 stars 1 forks source link

The following timetable file causes an error. #21

Closed ue71603 closed 2 months ago

ue71603 commented 2 months ago

_PROD_NETEX_TT_1.10_CHE_SKI_2024_OEV-SCHWEIZ_TIMETABLE_32_270_202404140804.zip

error that occured:

Traceback (most recent call last):
  File "C:\Users\ue71603\MG_Daten\github\reference\gtfs-netex-test\any-to-epip.py", line 297, in <module>
    conversion(input_filename, output_filename)
  File "C:\Users\ue71603\MG_Daten\github\reference\gtfs-netex-test\any-to-epip.py", line 106, in conversion
    service_calendar = servicecalendarepip.availabilityConditionsToServiceCalendar(service_journeys, availability_conditions)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ue71603\MG_Daten\github\reference\gtfs-netex-test\servicecalendarepip.py", line 151, in availabilityConditionsToServiceCalendar
    day_type_id = acs[0].id.replace('AvailabilityCondition', 'DayType')
                  ~~~^^^
IndexError: list index out of range

Process finished with exit code 1
skinkie commented 2 months ago

Swiss only does DayType/DayTypeRef per ServiceJourney?

ue71603 commented 2 months ago

99.9% should be done by AvailabilityCondition. DayType is not really that important for us.

skinkie commented 2 months ago

Then the likely question is: why doesn't it have an AvailabilityCondition. Any specific file I can test?

ue71603 commented 2 months ago

Didn't find it now. Probably a mismatch between the "static" files and the TimetableFrames...