skinkie / reference

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

SOLEA error in the handling of the interchanges #118

Closed ue71603 closed 1 week ago

ue71603 commented 3 weeks ago

S

tarting file: solea.zip

Generated

solea-netex (2).zip

the started to rebuild GTFS

total run:


{
    "block": "solea",
    "url":"https://transport.data.gouv.fr/datasets/fr-200052264-t0014-0000-1",
    "scripts": [
        {"script": "clean_tmp", "args": ["./aux_test_processing"]},
        {"script": "aux_gtfs_check.py", "args": ["./aux_test_input/solea.zip"]},
        {"script": "gtfs_import_to_db.py", "args": ["./aux_test_input/solea.zip ./aux_test_processing/gtfs-import.duckdb"]},
        {"script": "gtfs_convert_to_db.py", "args": ["./aux_test_processing/gtfs-import.duckdb ./aux_test_processing/netex-import.duckdb"]},
        {"script": "epip_db_to_db.py", "args": ["./aux_test_processing/netex-import.duckdb ./aux_test_processing/netex-database.duckdb"]},
        {"script": "epip_db_to_xml.py", "args": ["./aux_test_processing/netex-import.duckdb ./aux_test_processing/netex-database.duckdb ./aux_test_processing/solea-netex.xml"]},
        {"script": "aux_assertions.py", "args": ["./aux_test_input/general-netex-assertions.txt ./aux_test_processing/solea-netex.xml"]},
        {"script": "aux_netex_stats.py", "args": ["./aux_test_processing/solea-netex.xml"]},
        {"script": "netex_to_db.py", "args": ["./aux_test_processing/solea-netex.xml ./aux_test_processing/netex-database.duckdb"]},
        {"script": "netex_db_to_gtfs.py", "args": ["./aux_test_processing/netex-database.duckdb ./aux_test_processing/solea-gtfs.zip"]},
        {"script": "aux_gtfs_check.py", "args": ["./aux_test_processing/solea-gtfs.zip"]},
        {"script": "gtfs_show_map.py", "args": ["--limitation 1 ./aux_test_processing/solea-gtfs.zip ./aux_test_processing/solea-map.html"]}
        ]
  },

found that error:


Traceback (most recent call last):
  File "C:\Users\ue71603\MG_Daten\github\reference1\gtfs-netex-test\netex_db_to_gtfs.py", line 189, in <module>
    convert(archive, args.netex)
  File "C:\Users\ue71603\MG_Daten\github\reference1\gtfs-netex-test\netex_db_to_gtfs.py", line 47, in convert
    with sqlite3.connect(database) as con:
  File "C:\Users\ue71603\MG_Daten\github\reference1\gtfs-netex-test\netex_db_to_gtfs.py", line 162, in convert
    transfers = [GtfsProfile.projectInterchangeRuleToTransfer(transfer) for transfer in load_generator(con, InterchangeRule)] + [GtfsProfile.projectServiceJourneyInterchangeToTransfer(transfer) for transfer in load_generator(con, ServiceJourneyInterchange)] + [GtfsProfile.projectServiceJourneyMeeting(transfer) for transfer in load_generator(con, JourneyMeeting)]
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ue71603\MG_Daten\github\reference1\gtfs-netex-test\gtfsprofile.py", line 301, in projectInterchangeRuleToTransfer
    from_route_id = interchange_rule.feeder_filter.all_lines_or_lines_in_direction_refs_or_line_in_direction_ref[0].line_ref.ref
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'line_ref'
ue71603 commented 1 week ago

having it in scripts_prod.txt now

skinkie commented 1 week ago

@ue71603 is resolved or not?

ue71603 commented 1 week ago

The SOLEA GTFS does not have interchanges. I think I will have other interchanges to test... So I guess it is outdated...