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

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.load(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.load(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().encode("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().encode("utf-8"))
207
  except:
208
  # print("Error loading file: " + filepath)
209
  continue