From ed5744b1c3cc271eecea06487b64e843851b882a Mon Sep 17 00:00:00 2001 From: 66103286+srdfjy <66103286+srdfjy@users.noreply.github.com> Date: Tue, 30 Apr 2024 09:49:51 +0800 Subject: [PATCH] [Dataset] Resolving the 'Illegal seek' error caused by using a network stream --- wenet/dataset/datapipes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wenet/dataset/datapipes.py b/wenet/dataset/datapipes.py index 6d89ab5522..0e08876495 100644 --- a/wenet/dataset/datapipes.py +++ b/wenet/dataset/datapipes.py @@ -337,7 +337,7 @@ def __iter__(self): assert 'stream' in sample try: with tarfile.open(fileobj=sample['stream'], - mode="r:*") as stream: + mode="r|*") as stream: prev_prefix = None example = { 'file_name': sample['file_name'],