Closed siusoon closed 6 years ago
I am not 100% sure what’s causing the issue, but please check if your datasest is utf-8 encoded.
Another thing that came to my mind - it might be python 2/3 compatibility issue. I have tested it only with python 2.
With python3 you can change it to output.write(str(text) + "\n")
. Seemed to do the trick for me.
I had to also change all the print ".."
lines to use parenthesis like print("..")
Yes @gsurma it is the compatibility. And @fonzai it works after the changes! Many thanks!!!
Traceback (most recent call last): File "text_predictor.py", line 114, in
rnn()
File "text_predictor.py", line 76, in rnn
sample_text(sess, data_provider, iteration)
File "text_predictor.py", line 93, in sample_text
output.write(text + "\n")
TypeError: can't concat str to bytes
Any clue?