You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Loading a JSON file for materials that fails to load due to some missing data generates just an error by the catch-all error handler, e.g.:
PyAEDT ERROR: **************************************************************
PyAEDT ERROR: File "<frozen runpy>", line 198, in _run_module_as_main
PyAEDT ERROR: File "<frozen runpy>", line 88, in _run_code
PyAEDT ERROR: File "C:\git\Ansys\ic-setup-toolkit\venv\Scripts\pytest.exe\__main__.py", line 7, in <module>
PyAEDT ERROR: sys.exit(console_main())
PyAEDT ERROR: File "c:\git\Ansys\materials-avalanche\tests\test_apps.py", line 113, in test_json2amat_bad_json
PyAEDT ERROR: assert json2amat_main(args) == 1
PyAEDT ERROR: File "C:\git\Ansys\materials-avalanche\src\materials_avalanche\json2amat.py", line 70, in main
PyAEDT ERROR: if not hfss.materials.import_materials_from_file(input_path.as_posix()):
PyAEDT ERROR: 'red' on import_materials_from_file
PyAEDT ERROR: Method arguments:
PyAEDT ERROR: input_file = C:/git/Ansys/materials-avalanche/testdata/variations/process_materials_missing_rgb.json
PyAEDT ERROR: **************************************************************
While we can use this to find the actual problem, it would be nice to avoid the catch-all error handler and have a pointer at least to the material being parsed to narrow the search scope.
Steps To Reproduce
Take any valid materials JSON with "appearance data" and remove the RGB color values (keys "red,", "green," "blue")
Before submitting the issue
Description of the bug
Loading a JSON file for materials that fails to load due to some missing data generates just an error by the catch-all error handler, e.g.:
While we can use this to find the actual problem, it would be nice to avoid the catch-all error handler and have a pointer at least to the material being parsed to narrow the search scope.
Steps To Reproduce
Which Operating System are you using?
Windows
Which Python version are you using?
3.10
Installed packages
The text was updated successfully, but these errors were encountered: