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

TypeError: a bytes-like object is required, not 'str'

Open SAGGSOC opened this issue 7 years ago • 1 comments

(tensorflow) C:\Users\Sagar\stanford-tensorflow-tutorials\2017\assignments\chatbot>python data.py Preparing raw data into train set and test set ... Traceback (most recent call last): File "data.py", line 255, in 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'

SAGGSOC avatar Apr 16 '18 22:04 SAGGSOC

change rb to just r in file open line. there all files is text data not binary. look on similar issues here resolved alredy

MartinAbilev avatar Apr 19 '18 17:04 MartinAbilev