We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 985829b commit fb2d017Copy full SHA for fb2d017
lancaster_newsbooks/lancaster_newsbooks.py
@@ -91,7 +91,7 @@ def _generate_examples(self, data_dirs, split):
91
for subdir in data_dirs:
92
for file in glob.glob(os.path.join(subdir, "*.xml")):
93
text_parts = []
94
- with open(file, "r") as fp:
+ with open(file, "r", encoding="latin-1") as fp:
95
soup = BeautifulSoup(fp, features="xml")
96
title = soup.find("title").text
97
id = soup.newsbookDoc.attrs["id"]
0 commit comments