Skip to content

FileNotFoundError when accessing mounted Google Drive folder in Colab #1

@MayXiaoqingChen

Description

@MayXiaoqingChen

Hi, I have mounted my Google Drive at /content/drive, and I am trying to access a folder with the following code:

import os
folder_path = '/content/drive/MyDrive/UPENN/Shenlab/UNITO/Cytof_Data/Raw_Data_train'
print(os.listdir(folder_path))

However, I get the following error:
FileNotFoundError: [Errno 2] No such file or directory: '/content/drive/MyDrive/UPENN/Shenlab/UNITO/Cytof_Data/Raw_Data_train'

I have confirmed that my Drive is mounted correctly. Could this be an issue with the path or permissions?
To check, I ran:
!ls -al /content/drive/MyDrive/

And the output was:
total 0

It seems like MyDrive is mounted but empty, even though the folder exists in my Google Drive. Any help would be appreciated.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions