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 - format_version #217

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

Improve error handling in Problem.from_yaml - format_version #217

dweindl opened this issue Jul 25, 2023 · 0 comments

Comments

@dweindl
Copy link
Member

dweindl commented Jul 25, 2023

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

--> 250 if yaml_config[FORMAT_VERSION] not in {"1", 1, "1.0.0", "2.0.0"}:
    251     raise ValueError("Provided PEtab files are of unsupported version "
    252                      f"{yaml_config[FORMAT_VERSION]}. Expected "
    253                      f"{format_version.__format_version__}.")
    254 if yaml_config[FORMAT_VERSION] == "2.0.0":

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

No branches or pull requests

1 participant