when test "sample.py", there is a error report raised
File "C:/Users/HP/PycharmProjects/CharRnn/sample.py", line 20, in main FLAGS.start_string = FLAGS.start_string.decode('utf-8') AttributeError: 'str' object has no attribute 'decode'
Please use this code in Python2.7
what if i use Python3, how to fix?
Delect all the decode('utf-8') and encode('utf-8') in this code. Because python3 handles string in a different manner, I'm not sure whether it will work properly.
you can try to delete that sentence.I have a try,then it can work correctly,although I don not know why the reason.
delete,well done
just instead with:
FLAGS.start_string = FLAGS.start_string.encode('utf-8').decode('utf-8')