Search code examples
google-drive-apigoogle-colaboratorymount

Google drive blocked access to a file in Colab


I mounted my disk this way:

from google.colab import drive
drive.mount('/content/drive', force_remount=True)

And I get access to all the files on the disk except for one: MyDataset.zip

If I try to copy it this way:

  copy_cmd = "/content/drive/My\ Drive/MyDataset.zip /content/MyDataset"
  !cp $copy_cmd

He writes an error:

cp: error reading '/content/drive/My Drive/MyDataset.zip': Operation canceled

If I try to download it via the colab file browser, it writes this error:

Error
Download failed
Could not fetch resource at https://colab.research.google.com/tun/m/gpu-t4-s-3l8lfafkvov1w/files/content/drive/My%20Drive/MyDataset.zip?authuser=0: 500 
FetchError: Could not fetch resource at https://colab.research.google.com/tun/m/gpu-t4-s-3l8lfafkvov1w/files/content/drive/My%20Drive/MyDataset.zip?authuser=0: 500 
    at Dz.Cz [as constructor] (https://colab.research.google.com/v2/external/external_polymer_binary.js?vrz=colab-20200129-085600-RC01_292181754:910:76)
    at new Dz (https://colab.research.google.com/v2/external/external_polymer_binary.js?vrz=colab-20200129-085600-RC01_292181754:910:293)
    at Aa.program_ (https://colab.research.google.com/v2/external/external_polymer_binary.js?vrz=colab-20200129-085600-RC01_292181754:4070:158)
    at Ca (https://colab.research.google.com/v2/external/external_polymer_binary.js?vrz=colab-20200129-085600-RC01_292181754:17:336)
    at Aa.next_ (https://colab.research.google.com/v2/external/external_polymer_binary.js?vrz=colab-20200129-085600-RC01_292181754:15:474)
    at Ea.next (https://colab.research.google.com/v2/external/external_polymer_binary.js?vrz=colab-20200129-085600-RC01_292181754:18:206)
    at b (https://colab.research.google.com/v2/external/external_polymer_binary.js?vrz=colab-20200129-085600-RC01_292181754:26:268)

In this case, cp and file browser downloads work with any other files on the mounted disk.

Check this video: https://i.sstatic.net/JxTHf.jpg

What's wrong?


Solution

  • Well, I solved the problem, this is of course a crutch, but I had to split the archive into parts, change its format to rar (zip sucks with multi-volume and does not support modern encryption), and encrypt it, after that Google no longer blocks the transfer

    The most interesting thing is that MyDataset.zip was downloaded 2 times, and then suddenly stopped, and even after 2 days, nothing changed, either in the code or in the archive.

    Google can block unwanted files without warning.