sherjilozair / char-rnn-tensorflow

Multi-layer Recurrent Neural Networks (LSTM, RNN) for character-level language models in Python using Tensorflow
MIT License
2.64k stars 960 forks source link

Attempting to load from checkpoint gives unicode error. #67

Open PAK90 opened 7 years ago

PAK90 commented 7 years ago
Traceback (most recent call last):
  File "train.py", line 114, in <module>
    main()
  File "train.py", line 48, in main
    train(args)
  File "train.py", line 66, in train
    saved_model_args = cPickle.load(f)
  File "C:\Users\User\AppData\Local\Programs\Python\Python35\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 25: character maps to <undefined>

I'd stopped a run with ctrl+c and I assumed the checkpoint would work to restart it. Instead I get the above error. Running TF 0.12 on Windows 10 with CUDA 8 and cuDNN, Python v3.5.2.

codeman38 commented 7 years ago

Python 3 incompatibility issue, due to binary files wrongly being opened in text mode. The pull request above should fix it.

codeman38 commented 7 years ago

(Closed the above pull request because pull request #43, from back in July (!), does the same thing.)