googlecolab / colabtools

Python libraries for Google Colaboratory
Apache License 2.0
2.21k stars 725 forks source link

Folder created in colab with drive mounted does not show in drive. #2648

Open phil-in-a-can opened 2 years ago

phil-in-a-can commented 2 years ago

Describe the current behavior After running `import os if os.path.isdir("/content/drive/MyDrive/nfp-colab/pix2pixHD/"): %cd /content/drive/MyDrive/nfp-colab/pix2pixHD/ else: %cd /content/drive/MyDrive !mkdir nfp-colab %cd nfp-colab !git clone -b video https://github.com/dvschultz/pix2pixHD.git %cd pix2pixHD/

!pip install dominate`

The folder created shows in drive, the notebook can read/write to it, but it doesn't show up in the files pane in colab.

Describe the expected behavior The folder should be included in the list of folders/files in the files pane of colab.

What web browser you are using Using Chrome

Additional context [Link to a minimal, public, self-contained notebook that reproduces this issue. (https://colab.research.google.com/drive/1swpoylOqZpVg0yG04vj9dFDndK1vl5mf?usp=sharing)

cperry-goog commented 2 years ago

If you click on the refresh button in the files pane, does it show then?

phil-in-a-can commented 2 years ago

No, the refresh button does nothing. It doesn't matter what notebook I open, this folder doesn't show up. Another folder has the same behavior, it was created with a different notebook. The common factor is that both folders were created in with a code cell from the notebook.

cperry-goog commented 2 years ago

I have not been able to repro, but will keep open.

temp192000 commented 2 years ago

Can confirm, Just encountered this issue. can't figure out why

aissak21 commented 2 years ago

Same here.

tae0y commented 1 year ago

I'm experiencing same issue.

AlirezaSalehy commented 11 months ago

Same nerve cracking issue, Google Colab does claim that the folder exists and can list the content but Google Drive denies. Then after a tedious and tremendous effort when the session is closed and another session opened to test whether the folder is available it appears to be neither visible in Colab nor Drive and all is lost.

THIS has been going on for a year and a half and NOT FIXED.

kt-norton commented 9 months ago

+1 also seeing this

tae0y commented 9 months ago

My solution: Move each file under a folder named after the file

directory listing works because it is faster than file listing. directory listing read only meta information, but file listing requires reading the file information directly.

Or just iterate all files before you approach. it makes cache for google colab server. in my experience, it lasts 3-4 hours.

Aryazaky commented 1 month ago

+1. But in my case, not only folders, some files also go invisible in the Colab file explorer and also undetected by PDF loaders. Even though it correctly detects all files before, yesterday it suddenly refuses. Refresh also does not work. But today it works fine again. I don't know why. I don't know what's happening anymore...

giorgospets commented 1 week ago

+1