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

Add file tact/config/parserConfig.JSON #5

Open
lukenoaa opened this issue Oct 20, 2024 · 1 comment
Open

Add file tact/config/parserConfig.JSON #5

lukenoaa opened this issue Oct 20, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@lukenoaa
Copy link

Getting this error:

Exception: Failed to get settings for parser: 500
Traceback:
File "/Users/luke.thompson/miniconda3/envs/tact/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling
    result = func()
             ^^^^^^
File "/Users/luke.thompson/miniconda3/envs/tact/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec
    exec(code, module.__dict__)
File "/Users/luke.thompson/git/TACT/tact/UI/streamlit/TACT.py", line 52, in <module>
    file_path_from_settings = api_handle.get_config(config_type="parser", field="inputPath")
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/luke.thompson/git/TACT/tact/UI/streamlit/utils/api_handler.py", line 22, in get_config
    raise Exception(

Dylan believes it’s because the API is looking for a config file at “tact/config/parserConfig.JSON” and not finding it. Indeed, adding that file to the directory listed fixes the issue.

@Dylan-Pugh Dylan-Pugh self-assigned this Oct 21, 2024
@Dylan-Pugh Dylan-Pugh added the bug Something isn't working label Oct 21, 2024
@Dylan-Pugh
Copy link
Owner

Jotting some quick notes here:

The proper behavior in this instance would be to create a 'skeleton' config file when none is found, instead of failing.

The creation logic can live in controller.py here:

except (KeyError, FileNotFoundError) as ex:

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