First it was suggested that changing the mount location from /content/gdrive to /content/something else but this didnt fix it. I have found the reason why one cant mount ones own google drive for these things is because of a race condition with google. Anyway, hope this helps with your problem. ![]() I'm not sure if this 'My Drive' thing is just how my own google drive was initiated or is it always like that. ( Note the r flag, since os.listdir('/content/gdrive/"My Drive"/') won't work) ![]() In order to list all the files, you could run !ls /content/gdrive/'My Drive'/, or if you want the file names returned as a list, run print(os.listdir(r'/content/gdrive/My Drive/'). '/content/gdrive/"My Drive"/', as I was expecting '/content/gdrive/'. Hi don't know if this helps, but for me, although I mounted the Google Drive with drive.mount('/content/gdrive'), all of my files were surprisingly under What's wrong with it? I think this isn't a synchronization issue because It's been a while since I uploaded the file. What is more strange is that this problem happens sometime and sometimes all the files in the directory shows up. But in the sub directory, only one of the many files in the directory shows up when I use print(os.listdir('./gdrive/path/to/directory/')). I have mounted to gdrive using the package what ShumzZ told. ![]() I'm facing the same issue again and again.
0 Comments
Leave a Reply. |