def readfile(path): try: data = img.imread(path) return data except: print("Error reading: ", path) return np.array([])