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

Lobardia: Problem with PostalAddress_VersionStructure in epip_db_to_db.py #235

Closed
ue71603 opened this issue Jan 29, 2025 · 1 comment
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ue71603
Copy link
Collaborator

ue71603 commented Jan 29, 2025

Regression:



       {
    "block": "lombardiatrainitalia",
    "url":"https://www.cciss.it/nap/mmtis/public/catalog/Dataset/5486",
    "download_url":"https://github.com/user-attachments/files/18585826/IT-ITC4-TRENITALIA_126_L1.xml.gz",
    "scripts": [
        {"step":1,"script": "clean_tmp", "args": "%%dir%%"},
        {"step":2,"script": "download_input_file", "args": "%%dir%%"},
        {"step":3,"script": "netex_to_db.py", "args": "[%%inputfilepath%%] %%dir%%/02-import.duckdb True"},
        {"step":4,"script": "tool_netex_check_assertions.py", "args": "./scripts/general-netex-assertions.txt %%inputfilepath%%"},
        {"step":5,"script": "tool_netex_stats.py", "args": "%%inputfilepath%%"},
        {"step":6,"script": "tool_xml_validator.py", "args": "%%inputfilepath%% ./netex-xsd/xsd/NeTEx_publication.xsd"},
        {"step":7,"script": "epip_db_to_db.py", "args": "%%dir%%/02-import.duckdb %%dir%%/07-netex-database.duckdb"},
        {"step":8,"script": "epip_db_to_xml.py", "args": "%%dir%%/07-netex-database.duckdb %%dir%%/08-%%block%%-netex.xml.gz"},
        {"step":9,"script": "netex_to_db.py", "args": "[%%dir%%/08-%%block%%-netex.xml.gz] %%dir%%/08-gtfs.duckdb True"},
        {"step":10,"script": "related_explorer.py", "args": "%%dir%%/08-gtfs.duckdb Line random %%dir%%/09-line.xml.gz True"},
        {"step":11,"script": "gtfs_db_to_db.py", "args": "%%dir%%/08-gtfs.duckdb %%dir%%/10-gtfs.duckdb"},
        {"step":12,"script": "gtfs_db_to_gtfs.py", "args": "%%dir%%/10-gtfs.duckdb %%dir%%/11-%%block%%-gtfs.zip"},
        {"step":13,"script": "tool_simple_gtfs_validator.py", "args": "%%dir%%/11-%%block%%-gtfs.zip"},
        {"step":14,"script": "gtfs_show_map.py", "args": "%%dir%%/11-%%block%%-gtfs.zip %%dir%%/13-%%block%%-map.html 1"}
         ]
  },


2025-01-29 11:27:56,517 - script_runner - INFO - lombardiatrainitalia - step: 7: epip_db_to_db.py C:/Users/ue71603/Downloads/lombardiatrainitalia/02-import.duckdb C:/Users/ue71603/Downloads/lombardiatrainitalia/07-netex-database.duckdb


2025-01-29 11:28:21,680 - script_runner - ERROR - 'PostalAddress_VersionStructure' Traceback (most recent call last):
  File "C:\Users\ue71603\MG_Daten\github\reference1\gtfs-netex-test\tool_script_runner.py", line 261, in <module>
    main(args.script_file, args.log_file, args.log_level, args.blockname, args.begin_step)
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ue71603\MG_Daten\github\reference1\gtfs-netex-test\tool_script_runner.py", line 224, in main
    result=load_and_run(script_name, script_args)
  File "C:\Users\ue71603\MG_Daten\github\reference1\gtfs-netex-test\tool_script_runner.py", line 43, in load_and_run
    result = mod(*args1)
  File "C:\Users\ue71603\MG_Daten\github\reference1\gtfs-netex-test\epip_db_to_db.py", line 66, in main
    missing_class_update(source_db, target_db)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ue71603\MG_Daten\github\reference1\gtfs-netex-test\netexio\dbaccess.py", line 708, in missing_class_update
    embedded_classes = set(target_db.embedded())
                           ~~~~~~~~~~~~~~~~~~^^
  File "C:\Users\ue71603\MG_Daten\github\reference1\gtfs-netex-test\netexio\database.py", line 62, in embedded
    tables = {self.get_class_by_name(table) for table, in cur.fetchall() if table[0].isupper()} # TODO: Remove other classes from default namespace!
              ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
  File "C:\Users\ue71603\MG_Daten\github\reference1\gtfs-netex-test\netexio\database.py", line 66, in get_class_by_name
    return self.serializer.name_object[name]
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
KeyError: 'PostalAddress_VersionStructure'


Process finished with exit code 0
@ue71603 ue71603 added the bug Something isn't working label Jan 29, 2025
@ue71603 ue71603 added this to the 1.1 milestone Jan 29, 2025
@skinkie
Copy link
Owner

skinkie commented Jan 29, 2025

Duplicate of #234

@skinkie skinkie marked this as a duplicate of #234 Jan 29, 2025
@skinkie skinkie closed this as completed Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants