chiphuyen / stanford-tensorflow-tutorials

This repository contains code examples for the Stanford's course: TensorFlow for Deep Learning Research.
http://cs20.stanford.edu
MIT License
10.32k stars 4.32k forks source link

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

Open SAGGSOC opened 6 years ago

SAGGSOC commented 6 years ago

(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'

MartinAbilev commented 6 years ago

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