I am trying to run a facial recognition trainer that looks at a folder of jpg images of faces

```
import os                                               # importing the OS for path
import cv2                                              # importing the OpenCV library
import numpy as np                                      # importing Numpy library
from PIL import Image                                   # importing Image library

EigenFace = cv2.face.EigenFaceRecognizer_create(15)      # creating EIGEN FACE RECOGNISER
FisherFace = cv2.face.FisherFaceRecognizer_create(2)     # Create FISHER FACE RECOGNISER
LBPHFace = cv2.face.LBPHFaceRecognizer_create(1, 1, 7,7) # Create LBPH FACE RECOGNISER

path = 'dataSet'                                        # path to the photos
def getImageWithID (path):
    imagePaths = [os.path.join(path, f) for f in os.listdir(path)]
    FaceList = []
    IDs = []
    for imagePath in imagePaths:
        faceImage = Image.open(imagePath).convert('L')  # Open image and convert to gray
        faceImage = faceImage.resize((110,110))         # resize the image so the EIGEN recogniser can be trained
        faceNP = np.array(faceImage, 'uint8')           # convert the image to Numpy array
        ID = int(os.path.split(imagePath)[-1].split('.')[1])    # Retrieve the ID of the array
        FaceList.append(faceNP)                         # Append the Numpy Array to the list
        IDs.append(ID)                                  # Append the ID to the IDs list
        cv2.imshow('Training Set', faceNP)              # Show the images in the list
        cv2.waitKey(1)
    return np.array(IDs), FaceList                      # The IDs are converted in to a Numpy array
IDs, FaceList = getImageWithID(path)

```

which in turn returns the error

```
Traceback (most recent call last):
  File "/Users/jef/PycharmProjects/testProject/Python/Trainer_All.py", line 28, in <module>
    IDs, FaceList = getImageWithID(path)
  File "/Users/jef/PycharmProjects/testProject/Python/Trainer_All.py", line 19, in getImageWithID
    faceImage = Image.open(imagePath).convert('L')  # Open image and convert to gray
  File "/Users/jef/venv1/lib/python3.6/site-packages/PIL/Image.py", line 2452, in open
    % (filename if filename else fp))
OSError: cannot identify image file 'dataSet/.DS_Store'

```

The folder dataSet exists and i'm running the code on my mac, and the most recent versions of Pillow, numpy and cv2, I've googled the OSError but not much came up to help this particular problem. Any ideas?