diff --git a/CHANGELOG.md b/CHANGELOG.md index bc6340e6..6076b631 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Fixed + +- Don't try to assign non-existing output writer during eval mode. + ## [3.4.0] - 2023-06-19 ### Added diff --git a/casanovo/denovo/model_runner.py b/casanovo/denovo/model_runner.py index fb5deeba..223c14c7 100644 --- a/casanovo/denovo/model_runner.py +++ b/casanovo/denovo/model_runner.py @@ -124,7 +124,7 @@ def _execute_existing( if len(peak_filenames := _get_peak_filenames(peak_path, peak_ext)) == 0: logger.error("Could not find peak files from %s", peak_path) raise FileNotFoundError("Could not find peak files") - else: + elif out_writer is not None: out_writer.set_ms_run(peak_filenames) peak_is_index = any( [os.path.splitext(fn)[1] in (".h5", ".hdf5") for fn in peak_filenames]