From aa0150eb65b3bb0ca04a26e3ed653de74362abe4 Mon Sep 17 00:00:00 2001 From: Gokkul Nath TS Date: Fri, 9 Mar 2018 21:33:46 +0530 Subject: [PATCH] Avoid "NotADirectoryError" on .DS_Store #200 --- fastai/dataset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastai/dataset.py b/fastai/dataset.py index dbc3b31e1..6a7bc0c89 100644 --- a/fastai/dataset.py +++ b/fastai/dataset.py @@ -43,7 +43,7 @@ def read_dirs(path, folder): labels, filenames, all_labels = [], [], [] full_path = os.path.join(path, folder) for label in sorted(os.listdir(full_path)): - if label not in ('.ipynb_checkpoints'): + if label not in ('.ipynb_checkpoints','.DS_Store'): all_labels.append(label) for fname in os.listdir(os.path.join(full_path, label)): filenames.append(os.path.join(folder, label, fname))