for line in open(os.path.expanduser(path), "rb"):
line = UnicodeDammit(line).unicode_markup.split()
label, text = line[0], " ".join(line[1:])
examples.append(data.Example.fromlist([text, label], fields))
super(TREC, self).__init__(examples, fields, **kwargs)
After Change
for line in open(os.path.expanduser(path), "rb"):
// there is one non-ASCII byte: sisterBADBYTEcity; replaced with space
label, _, text = line.replace(b"\xf0", b" ").decode().partition(" ")
examples.append(data.Example.fromlist([text, label], fields))
super(TREC, self).__init__(examples, fields, **kwargs)