stanford-tensorflow-tutorials icon indicating copy to clipboard operation
stanford-tensorflow-tutorials copied to clipboard

cannot run data.py on the specified corpus

Open gururajl opened this issue 8 years ago • 1 comments

running python data.py is causing followin error, must be because of opening it in binary mode. Tried it with python 3.5.3 on macOS Sierra

Traceback (most recent call last):
  File "data.py", line 255, in <module>
    prepare_raw_data()
  File "data.py", line 178, in prepare_raw_data
    id2line = get_lines()
  File "data.py", line 34, in get_lines
    parts = line.split(' +++$+++ ')
TypeError: a bytes-like object is required, not 'str'

gururajl avatar Aug 05 '17 18:08 gururajl

when open the file,don't use the binary mode.

ljch2018 avatar Aug 13 '17 09:08 ljch2018