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

Improve error handling in Problem.from_yaml - parameter_file #218

Open
dweindl opened this issue Jul 25, 2023 · 0 comments
Open

Improve error handling in Problem.from_yaml - parameter_file #218

dweindl opened this issue Jul 25, 2023 · 0 comments

Comments

@dweindl
Copy link
Member

dweindl commented Jul 25, 2023

Missing parameter_file in the yaml file should provide a proper error message instead of just a KeyError:

File petab/problem.py:259, in Problem.from_yaml(yaml_config)
    255     warn("Support for PEtab2.0 is experimental!")
    257 problem0 = yaml_config['problems'][0]
--> 259 if isinstance(yaml_config[PARAMETER_FILE], list):
    260     parameter_df = parameters.get_parameter_df([
    261         get_path(f)
    262         for f in yaml_config[PARAMETER_FILE]
    263     ])
    264 else:

KeyError: 'parameter_file'

Also applies to sbml_files in --> 270 if len(problem0[SBML_FILES]) > 1:

@dweindl dweindl changed the title Improve error handling in validator - parameter_file Improve error handling in Problem.from_yaml - parameter_file Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant