From 137df0ce22c770879f459d0ed45c3d9828d2f867 Mon Sep 17 00:00:00 2001 From: Daniel McDonald Date: Tue, 27 Jun 2023 10:05:59 -0700 Subject: [PATCH] BUG: stderr not reported --- gtdbtk/external/mash.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gtdbtk/external/mash.py b/gtdbtk/external/mash.py index 7ee0214..3a2e696 100644 --- a/gtdbtk/external/mash.py +++ b/gtdbtk/external/mash.py @@ -234,14 +234,17 @@ def _generate(self): args = list(map(str, args)) proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding='utf-8') + stderr_lines = [] with tqdm_log(total=len(self.genomes), unit='genome') as p_bar: for line in iter(proc.stderr.readline, ''): + stderr_lines.append(line) if line.startswith('Sketching'): p_bar.update() proc.wait() if proc.returncode != 0 or not os.path.isfile(self.path): - raise GTDBTkExit(f'Error generating Mash sketch: {proc.stderr.read()}') + raise GTDBTkExit(f'Error generating Mash sketch:\n' + f'{"".join(stderr_lines)}') class QrySketchFile(SketchFile):