title: pickle data was truncated
body: <p>i created a corpus file then stored in a pickle file.
  my messages file is a collection of different news articles dataframe.</p>
  
  <pre><code>from nltk.corpus import stopwords
  from nltk.stem.porter import PorterStemmer
  import re
  ps = PorterStemmer()
  corpus = []
  for i in range(0, len(messages)):
      review = re.sub('[^a-zA-Z]', ' ', messages['text'][i])
      review = review.lower()
      review = review.split()
  
      review = [ps.stem(word) for word in review if not word in stopwords.words('english')]
      review = ' '.join(review)
      #print(i)
      corpus.append(review)
  
  import pickle
  with open('corpus.pkl', 'wb') as f:
     pickle.dump(corpus, f)
  </code></pre>
  
  <p>same code I ran on my laptop (jupyter notebook) and on google colab.</p>
  
  <p>corpus.pkl => Google colab, downloaded with the following code:</p>
  
  <pre><code>from google.colab import files
  files.download('corpus.pkl')
  </code></pre>
  
  <p>corpus1.pkl => saved from jupyter notebook code.</p>
  
  <p>now When I run this code:</p>
  
  <pre class="lang-py prettyprint-override"><code>import pickle
  with open('corpus.pkl', 'rb') as f:   # google colab
      corpus = pickle.load(f)
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>UnpicklingError: pickle data was truncated
  </code></pre>
  
  <p>But this works fine:</p>
  
  <pre class="lang-py prettyprint-override"><code>import pickle
  with open('corpus1.pkl', 'rb') as f:  # jupyter notebook saved
      corpus = pickle.load(f)
  </code></pre>
  
  <p>The only difference between both is that <code>corpus1.pkl</code> is run and saved through Jupyter notebook (on local) and <code>corpus.pkl</code> is saved on google collab and downloaded.</p>
  
  <p>Could anybody tell me why is this happening?</p>
  
  <p>for reference..</p>
  
  <pre><code>corpus.pkl  =&gt; 36 MB
  corpus1.pkl =&gt; 50.5 MB
  </code></pre>