Skip to content

Commit

Permalink
fix: fix the bug of considering the Path as a str when loading from T…
Browse files Browse the repository at this point in the history
…REC dataset (#247)
  • Loading branch information
yzong12138 authored Jan 24, 2024
1 parent c7e61da commit 05aa705
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ir_datasets/formats/trec.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 05aa705

Please sign in to comment.