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): diff --git a/setup.py b/setup.py index b72f075..7d219fa 100644 --- a/setup.py +++ b/setup.py @@ -45,7 +45,7 @@ def readme(): 'gtdbtk = gtdbtk.__main__:main' ] }, - install_requires=["dendropy>=4.1.0", 'numpy>=1.9.0', 'tqdm>=4.35.0', 'pydantic'], + install_requires=["dendropy>=4.1.0", 'numpy>=1.9.0', 'tqdm>=4.35.0', 'pydantic>=1.9.2,<2'], license=meta['license'], long_description=readme(), long_description_content_type='text/markdown',