diff --git a/ir_datasets/formats/trec.py b/ir_datasets/formats/trec.py index cf01cac0..16259112 100644 --- a/ir_datasets/formats/trec.py +++ b/ir_datasets/formats/trec.py @@ -159,7 +159,7 @@ def _docs_iter(self, path): elif path_suffix in ['.z', '.0z', '.1z', '.2z']: # unix "compress" command encoding unlzw3 = ir_datasets.lazy_libs.unlzw3() - with io.BytesIO(unlzw3.unlzw(path)) as f: + with io.BytesIO(unlzw3.unlzw(Path(path))) as f: yield from self._parser(f) else: with open(path, 'rb') as f: