title: Google-Colab No such file or directory
body: <p>I'm trying to access a dataset directly from my computer in Google Colab from a Youtube tutorial and I keep getting errors saying the file or directory doesn't exist. I've tried writing the path name differently, using '\' instead of '/', using r"...",copying the exact code from the tutorial and directly copying the path from properties and nothing works. I've found similar questions on SO but nothing that helps. Here is my code:</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  import os
  import cv2
  
  DATADIR = "C:/Datasets/PetImages"
  CATEGORIES = ["Dog", "Cat"]
  
  for category in CATEGORIES:
    path = os.path.join(DATADIR, category)
    for img in os.listdir(path):
      img_array = cv2.imread(os.path.join(path,img), cv2.IMREAD_GRAYSCALE)
      plt.imshow(img_array, cmap='gray')
      plt.show()
      break
    break
  </code></pre>
  
  <p>These are my errors:</p>
  
  <pre><code>FileNotFoundError                         Traceback (most recent call last)
  &lt;ipython-input-15-f8d293e3d38a&gt; in &lt;module&gt;()
        9 for category in CATEGORIES:
       10   path = os.path.join(DATADIR, category)
  ---&gt; 11   for img in os.listdir(path):
       12     img_array = cv2.imread(os.path.join(path,img), cv2.IMREAD_GRAYSCALE)
       13     plt.imshow(img_array, cmap='gray')
  
  FileNotFoundError: [Errno 2] No such file or directory: '/Datasets/PetImages/Dog'
  </code></pre>