ValueError: Mountpoint must not contain a space. (Colab)

There is a dedicated button in the sidebar that pastes the necessary cell to mount the drive:

enter image description here


Run instead:

from google.colab import drive
drive.mount('/content/drive')

The leading / is important. Once mounted at /content/drive, you'll see My Drive/ML in that directory. /content/drive is the directory path on your local machine. My Drive/ML is the path within your Drive. (My Drive distinguishes your Drive from Team drives.)


  1. Mount at /content/drive

    from google.colab import drive
    drive.mount('/content/drive')
    
  2. Change directory using cd command

    cd 'drive/My Drive'
    

enter image description here