title: Google Colab - downloads some files, TypeError: Failed to fetch on others
body: <p>I have a Google Colab notebook with PyTorch code running in it.
  At the beginning of the train function, I create, save and download word_to_ix and tag_to_ix dictionaries without a problem, using the following code:</p>
  
  <pre><code>from google.colab import files
  
  torch.save(tag_to_ix, pos_dict_path)
  files.download(pos_dict_path)
  torch.save(word_to_ix, word_dict_path)
  files.download(word_dict_path)
  </code></pre>
  
  <p>I train the model, and then try to download it with the code:</p>
  
  <pre><code>torch.save(model.state_dict(), model_path)
  files.download(model_path)
  </code></pre>
  
  <p>Then I get a <code>MessageError: TypeError: Failed to fetch</code>.
  Obviously, the problem is not with the third party cookies (as suggested <a href="https://stackoverflow.com/questions/53581023/google-colab-file-download-failed-to-fetch-error">here</a>), because the first files are downloaded without a problem. (I actually also tried adding the link in my <code>Allow</code> section, but, surprise surprise, it made no difference.)</p>
  
  <p>I was originally trying to save the model as is (which, to my understanding, saves it as a Pickle), and I thought maybe Colab files doesn't handle downloading Pickles well, but as you can see above, I'm now trying to save a dict object (which is also what word_to_ix and tag_to_ix) are, and it's still not working.</p>
  
  <p>Downloading the file manually with right-click isn't a solution, because sometimes I leave the code running while I do other things, and by the time I get back to it, the runtime has disconnected, and the files are gone.</p>
  
  <p>Any suggestions?</p>