diff --git a/src/biocatalyzer/bioreactor.py b/src/biocatalyzer/bioreactor.py index 396b5ef..c98a0df 100644 --- a/src/biocatalyzer/bioreactor.py +++ b/src/biocatalyzer/bioreactor.py @@ -605,9 +605,9 @@ def _react_single(self, smiles: str, smarts: str): with open(self._new_compounds_path, 'a', newline='', encoding='utf-8') as f: f.write(f"{smiles_id}\t{smiles}\t{smarts_id}\t{smiles_id}_{uuid.uuid4()}\t" f"{most_similar_product}\t{result}\t{ecs}\n") - if f"{smiles_id}\t{smiles}\t{smarts_id}\t{smiles_id}_{uuid.uuid4()}\t{most_similar_product}\t{result}\t{ecs}\n".split('\t') != 6: - e = f"{smiles_id}\t{smiles}\t{smarts_id}\t{smiles_id}_{uuid.uuid4()}\t{most_similar_product}\t{result}\t{ecs}\n" - raise ValueError(f"Wrong number of columns. Got {len(e.split('\t'))} columns. {e}") + line = f"{smiles_id}\t{smiles}\t{smarts_id}\t{smiles_id}_{uuid.uuid4()}\t{most_similar_product}\t{result}\t{ecs}\n".split('\t') + if len(line) != 7: + raise ValueError(f"Wrong number of columns. Got {line}") def react(self):