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

Commit

Permalink
Fixing #359: decoding str object instead of bytes (#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
pltrdy authored and rsepassi committed Oct 14, 2017
1 parent f9f41eb commit 3a9c950
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tensor2tensor/data_generators/cnn_dailymail.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def story_generator(tmp_dir):
for path in paths:
for story_file in tf.gfile.Glob(path + "*"):
story = u""
for line in tf.gfile.Open(story_file):
for line in tf.gfile.Open(story_file, 'rb'):
line = unicode(line, "utf-8") if six.PY2 else line.decode("utf-8")
story += line
yield story
Expand Down

0 comments on commit 3a9c950

Please sign in to comment.