Update AmericanStories.py
Browse files- 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().
|
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().
|
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
|