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

Uncaught exception when LogicFile cannot be found #65

Closed
markuspi opened this issue Sep 30, 2024 · 1 comment · Fixed by #68
Closed

Uncaught exception when LogicFile cannot be found #65

markuspi opened this issue Sep 30, 2024 · 1 comment · Fixed by #68
Labels
isType:Bug An issue that contains contradictions or errors in the standard.

Comments

@markuspi
Copy link

Describe the bug
When the RoadNetwork > LogicFile points to a file that does not exist, an ungaught exception is thrown.
This results in no result file being generated. The qc-framework thus does not get notified about the problem; the report does not indicate any failed checks.

To Reproduce
Steps to reproduce the behavior:

  1. Use a valid XOSC file
  2. Change the LogicFile.filepath to a nonexistant file
  3. Run checker, observe an exception in the console log

Expected behavior
No exception should be raised. A check error should be generated, indicating that the file does not exist. Subsequent checks should run normally.

Console Output

[...]>qc_runtime --config qc_config.xml --manifest "[...]\bin/../manifest/framework.json" --working_dir .
Registering manifest file at [...]\bin/../manifest/qc_opendrive.json
Registering manifest file at [...]\bin/../manifest/qc_openscenarioxml.json
Registering manifest file at [...]\bin/../manifest/report_gui.json
Registering manifest file at [...]\bin/../manifest/result_pooling.json
Registering manifest file at [...]\bin/../manifest/text_report.json
Executing checker bundles
Executing checker module:  xoscBundle
Executing command: cd %ASAM_QC_FRAMEWORK_WORKING_DIR% && qc_openscenario -c %ASAM_QC_FRAMEWORK_CONFIG_FILE%
Error occurred while executing the command.
Error message:
2024-09-30 11:02:19,978 - Initializing checks
2024-09-30 11:02:19,979 - Executing valid_xml_document check
2024-09-30 11:02:19,979 - - It is an xml document.
2024-09-30 11:02:19,980 - Executing root_tag_is_openscenario check
2024-09-30 11:02:19,980 - - Root tag is 'OpenSCENARIO'
2024-09-30 11:02:19,980 - Executing fileheader_is_present check
2024-09-30 11:02:19,980 - - Root tag contains FileHeader -> OK
2024-09-30 11:02:19,980 - Executing version_is_defined check
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "[...]\.venv\Scripts\qc_openscenario.exe\__main__.py", line 7, in <module>
  File "[...]\.venv\Lib\site-packages\qc_openscenario\main.py", line 244, in main
    run_checks(config, result)
  File "[...]\.venv\Lib\site-packages\qc_openscenario\main.py", line 180, in run_checks
    checker_data.xodr_root = utils.get_xodr_road_network(
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "[...]\.venv\Lib\site-packages\qc_openscenario\checks\utils.py", line 138, in get_xodr_road_network
    xodr_root = get_root_without_default_namespace(filepath)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "[...]\.venv\Lib\site-packages\qc_openscenario\checks\utils.py", line 21, in get_root_without_default_namespace
    with open(path, "rb") as raw_file:
         ^^^^^^^^^^^^^^^^
OSError: [Errno 22] Invalid argument: 'doesnotexist.xodr'
@markuspi markuspi added the isType:Bug An issue that contains contradictions or errors in the standard. label Sep 30, 2024
@hoangtungdinh hoangtungdinh moved this to In progress in Quality Checker Oct 1, 2024
@AsamDiegoSanchez AsamDiegoSanchez added the isState:New A new issue that needs to be classified to a type. label Oct 2, 2024
@hoangtungdinh hoangtungdinh moved this from In progress to Can close in Quality Checker Oct 2, 2024
@hoangtungdinh
Copy link
Contributor

Thanks @markuspi for reporting the issue. It will be fixed once #68 is merged.

@andreaskern74 andreaskern74 removed the isState:New A new issue that needs to be classified to a type. label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
isType:Bug An issue that contains contradictions or errors in the standard.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants