diff --git a/scripts/assign-colors.py b/scripts/assign-colors.py index a9018f0..a87aecf 100644 --- a/scripts/assign-colors.py +++ b/scripts/assign-colors.py @@ -69,7 +69,7 @@ def index_of(search_list, search_value, not_found_value): print(f"WARNING: For trait {category} we encountered {len(missing)} value(s) not present in the ordering TSV: {missing}", file=stderr) try: hexes = schemes[len(observations)] - except IndexError: + except KeyError: raise Exception(f"Ordering '{category}' had {len(observations)} values but the color-schemes don't go this high!") for pair in zip(observations, hexes): tsv_writer.writerow([category, *pair])