i post from my original code,
crystal = open('vmises.dat','r')
crystalincrement = pickle.load(crystal)
crystaldir = pickle.load(crystal)
crystalface = pickle.load(crystal)
crystal.close()
Error is,
crystalincrement = pickle.load(crystal)
TypeError: 'str' does not support the buffer interface
i use python V 3.2
The real answer should be open the file in binary mode in windows. open('data.txt', 'rb')
The question was edited after I originally posted this and it was accepted. The answer to the updated question is to open the file in binary mode:
crystal = open('vmises.dat', 'rb')
Answer to original, pre-edit question:
Well, data
is a string. The object you need to work on is a
.
a = open('data.txt','r')
b = pickle.load(a)
c = pickle.load(a)
d = pickle.load(a)
a.close()
For pickle
info, see the Python Wiki or Python for Kids.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With