Skip to content

Commit 0d2b39a

Browse files
committed
decode byte text to prevent error in python3
1 parent 5c78b9d commit 0d2b39a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

research/textsum/batch_reader.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -262,4 +262,6 @@ def _GetExFeatureText(self, ex, key):
262262
Returns:
263263
feature: a feature text extracted.
264264
"""
265-
return ex.features.feature[key].bytes_list.value[0]
265+
byte_text = ex.features.feature[key].bytes_list.value[0]
266+
return byte_text.decode('utf-8')
267+

0 commit comments

Comments
 (0)