title: WinError 3 The system cannot find the path specified: when loading image files
body: <p>I tried to load image data, but I failed with error:</p>
  
  <pre><code> FileNotFoundError: [WinError 3] The system cannot find the path specified:
  </code></pre>
  
  <p>The code is as below.</p>
  
  <pre><code>def load_data():
        datasets = ['seg_train/seg_train', 'seg_test/seg_test']
      size = (150,150)
      output = []
      for dataset in datasets:
          directory = 
              "D:/Hoin/Desktop/호준폴더/Python/Data/intel-image-classification/" + dataset
          images = []
          labels = []
          for folder in os.listdir(directory):
              curr_label = class_names_label[folder]
              for file in os.listdir(directory + "/" + folder):
                  img_path = directory + "/" + folder + "/" + file
                  curr_img = cv2.imread(img_path)
                  curr_img = cv2.resize(curr_img, size)
                  images.append(curr_img)
                  labels.append(curr_label)
          images, labels = shuffle(images, labels)     ### Shuffle the data !!!
          images = np.array(images, dtype = 'float32') ### Our images
          labels = np.array(labels, dtype = 'int32')   ### From 0 to 
  num_classes-1!
  
          output.append((images, labels))
  
      return output
  
  
  (train_images, train_labels), (test_images, test_labels) = load_data()
  </code></pre>
  
  <p>then I get</p>
  
  <pre><code>Traceback (most recent call last):
  
    File "&lt;ipython-input-59-bdc5f874dbf6&gt;", line 1, in &lt;module&gt;
      (train_images, train_labels), (test_images, test_labels) = load_data()
  
    File "&lt;ipython-input-58-23e2daec9c02&gt;", line 15, in load_data
      for folder in os.listdir(directory):
  
    FileNotFoundError: [WinError 3] 지정된 경로를 찾을 수 없습니다: 
    'D:/Hoin/Desktop/호준폴더/Python/Data/intel-image-classification/seg_train/seg_train'  
  (this means ''FileNotFoundError: [WinError 3] The system cannot find the path specified:') 
  </code></pre>
  
  <p>I do not know how to solve this problem. I am using <code>windows</code> version <code>anaconda</code>.<br>
  Can anyone help me on this? Thank you.</p>