diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-09-30 14:02:19 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-09-30 14:02:19 +0200 |
commit | dfc888a1ee09e377c015cef0dac9652d97f9c698 (patch) | |
tree | 9a4988e9ab736ad373675b7e73c3fafdfde036b4 /lib/utils.py | |
parent | 621e65ecf1fdfc383ddd26829215d07a86059a0c (diff) |
observations_to_by_name: None values are illegal
Diffstat (limited to 'lib/utils.py')
-rw-r--r-- | lib/utils.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/utils.py b/lib/utils.py index 2c879c0..b904974 100644 --- a/lib/utils.py +++ b/lib/utils.py @@ -227,6 +227,10 @@ def observations_to_by_name(observations: list, attributes: list): param_dict_to_list(observation["param"], parameter_names) ) for attribute in attributes: + if observation[attribute] is None: + raise ValueError( + f"""Attribute "{attribute}" of observation "{name}" is None. This is not allowed. Parameters = {observation["param"]}""" + ) by_name[name][attribute].append(observation[attribute]) for name in by_name: for attribute in attributes: |