python: pickle.load() raising EOFError
<p>I have a pickle file using .txt format. I want to load this pickle file with python 2.7. The size is 438.5 MB. This is how I load data :</p>

<pre><code>def readpickle(path="C:/Python27/Lib/site-packages/xy/"):
with open(path+"filenamereal2.txt","rb") as f:
    model = pickle.load(f)

return model
</code></pre>

<p>And I get this error </p>

<pre><code>    itemmodelreal=readpickle(path="C:/Users/Lab Komputasi/Documents/estu/") 
Traceback (most recent call last):
File "&lt;ipython-input-33-265e46f74915&gt;", line 1, in &lt;module&gt;
    itemmodelreal=readpickle(path="C:/Users/Lab Komputasi/Documents/estu/")

  File "&lt;ipython-input-31-fbd3e8b9e043&gt;", line 3, in readpickle
    model = pickle.load(f)

  File "C:\Users\Lab Komputasi\Anaconda2\lib\pickle.py", line 1384, in load
    return Unpickler(file).load()

  File "C:\Users\Lab Komputasi\Anaconda2\lib\pickle.py", line 864, in load
    dispatch[key](self)

  File "C:\Users\Lab Komputasi\Anaconda2\lib\pickle.py", line 886, in load_eof
    raise EOFError

EOFError
</code></pre>

<p>this is the code that i use to write pickle :</p>

<pre><code> with open("filenamereal3.txt", "wb") as f:
    pickle.dump(result, f)
f.close()
</code></pre>

<p>I have used read binary ('rb') to load and write binary ('wb') to write, but it's still have that error.
Do you have any idea why it's still error? how can i solve this error?</p>

<p>Thank you for your help....</p>