The following command to get a list of all experiments in YAML format works as expected:
$ elapi get experiments --format yml
However, when the --format is invalid or unsupported instead of falling back to a predefined fallback format elapi throws a Python error with Python traceback. Though this behavior itself isn't too unusual, it was not intended. elAPI should just show the output format in fallback format.
$ elapi get experiments -F foo
ERROR 'foo' isn't a supported language format! Supported formats are: ['json', 'yaml', 'txt'].
INFO elapi will fallback to 'txt' format.
<Python traceback>
ValueError: 'foo' isn't a supported language format! Supported formats are: ['json', 'yaml', 'txt'].
In GitLab by @mhxion on Mar 6, 2024, 16:48
The following command to get a list of all experiments in
YAML
format works as expected:However, when the
--format
is invalid or unsupported instead of falling back to a predefined fallback format elapi throws a Python error with Python traceback. Though this behavior itself isn't too unusual, it was not intended. elAPI should just show the output format in fallback format.