Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Commit 3a9c950

Browse files
pltrdyrsepassi
authored andcommitted
Fixing #359: decoding str object instead of bytes (#360)
1 parent f9f41eb commit 3a9c950

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tensor2tensor/data_generators/cnn_dailymail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def story_generator(tmp_dir):
7474
for path in paths:
7575
for story_file in tf.gfile.Glob(path + "*"):
7676
story = u""
77-
for line in tf.gfile.Open(story_file):
77+
for line in tf.gfile.Open(story_file, 'rb'):
7878
line = unicode(line, "utf-8") if six.PY2 else line.decode("utf-8")
7979
story += line
8080
yield story

0 commit comments

Comments
 (0)