Update datasets.py
Browse files- utils/datasets.py +2 -2
utils/datasets.py
CHANGED
@@ -294,8 +294,8 @@ class LoadImagesAndLabels(Dataset): # for training/testing
|
|
294 |
raise Exception('%s does not exist' % p)
|
295 |
path = p # *.npy dir
|
296 |
self.img_files = [x.replace('/', os.sep) for x in f if os.path.splitext(x)[-1].lower() in img_formats]
|
297 |
-
except:
|
298 |
-
raise Exception('Error loading data from %s
|
299 |
|
300 |
n = len(self.img_files)
|
301 |
assert n > 0, 'No images found in %s. See %s' % (path, help_url)
|
|
|
294 |
raise Exception('%s does not exist' % p)
|
295 |
path = p # *.npy dir
|
296 |
self.img_files = [x.replace('/', os.sep) for x in f if os.path.splitext(x)[-1].lower() in img_formats]
|
297 |
+
except Exception as e:
|
298 |
+
raise Exception('Error loading data from %s: %s\nSee %s' % (path, e, help_url))
|
299 |
|
300 |
n = len(self.img_files)
|
301 |
assert n > 0, 'No images found in %s. See %s' % (path, help_url)
|