lhoestq HF staff commited on
Commit
b41a6c7
1 Parent(s): 2752e54

Update AmericanStories.py

Browse files
Files changed (1) hide show
  1. AmericanStories.py +2 -2
AmericanStories.py CHANGED
@@ -176,7 +176,7 @@ class AmericanStories(datasets.GeneratorBasedBuilder):
176
  for filepath, f in files:
177
  if filepath.startswith(year_dir):
178
  try :
179
- data = json.loads(f.read().encode("utf-8"))
180
  except:
181
  print("Error loading file: " + filepath)
182
  continue
@@ -203,7 +203,7 @@ class AmericanStories(datasets.GeneratorBasedBuilder):
203
  for filepath, f in files:
204
  if filepath.startswith(year_dir):
205
  try :
206
- data = json.loads(f.read().encode("utf-8"))
207
  except:
208
  # print("Error loading file: " + filepath)
209
  continue
 
176
  for filepath, f in files:
177
  if filepath.startswith(year_dir):
178
  try :
179
+ data = json.loads(f.read().decode("utf-8"))
180
  except:
181
  print("Error loading file: " + filepath)
182
  continue
 
203
  for filepath, f in files:
204
  if filepath.startswith(year_dir):
205
  try :
206
+ data = json.loads(f.read().decode("utf-8"))
207
  except:
208
  # print("Error loading file: " + filepath)
209
  continue