Skip to content

Commit dc9c6b2

Browse files
committed
Fix ValueError: bad delimiter value in Python 3.13
``` FAILED test/torchaudio_unittest/datasets/cmuarctic_test.py::TestCMUARCTIC::test_cmuarctic_path - ValueError: bad delimiter value FAILED test/torchaudio_unittest/datasets/cmuarctic_test.py::TestCMUARCTIC::test_cmuarctic_str - ValueError: bad delimiter value ```
1 parent 4cb7f57 commit dc9c6b2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/torchaudio/datasets/cmuarctic.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import csv
21
import os
32
from pathlib import Path
43
from typing import Tuple, Union
@@ -129,8 +128,7 @@ def __init__(
129128
self._text = os.path.join(self._path, self._folder_text, self._file_text)
130129

131130
with open(self._text, "r") as text:
132-
walker = csv.reader(text, delimiter="\n")
133-
self._walker = list(walker)
131+
self._walker = [[line.strip()] for line in text if line.strip()]
134132

135133
def __getitem__(self, n: int) -> Tuple[Tensor, int, str, str]:
136134
"""Load the n-th sample from the dataset.

0 commit comments

Comments
 (0)