pender / chatbot-rnn

A toy chatbot powered by deep learning and trained on data from Reddit
MIT License
899 stars 370 forks source link

TypeError: expected str, bytes or os.PathLike object, not _io.TextIOWrapper #30

Closed rashidAI closed 6 years ago

rashidAI commented 6 years ago

While trying to execute this example i am getting this error "TypeError: expected str, bytes or os.PathLike object, not _io.TextIOWrapper" when i google this i get suggestion of pickle.load(open( f, "rb" ) ),

Can any tell the problem with code. using windwos 8.1 anaconda 5 python 3

ButterscotchV commented 6 years ago

The code suggested is close, here's code that should work:

with open(config_path, 'rb') as f:
    saved_args = cPickle.load(f)
# Separately load chars and vocab from the save directory.
with open(vocab_path, 'rb') as f:
    chars, vocab = cPickle.load(f)
pender commented 6 years ago

Hi, I pushed a significant update to TF 1.4 and Python3, so I am closing out old issues -- feel free to reopen if this is still a problem, and I will take a look.