Skip to content

Commit fb2d017

Browse files
committed
Update lancaster_newsbooks.py
Include encoding="latin-1"
1 parent 985829b commit fb2d017

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lancaster_newsbooks/lancaster_newsbooks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def _generate_examples(self, data_dirs, split):
9191
for subdir in data_dirs:
9292
for file in glob.glob(os.path.join(subdir, "*.xml")):
9393
text_parts = []
94-
with open(file, "r") as fp:
94+
with open(file, "r", encoding="latin-1") as fp:
9595
soup = BeautifulSoup(fp, features="xml")
9696
title = soup.find("title").text
9797
id = soup.newsbookDoc.attrs["id"]

0 commit comments

Comments
 (0)