glenn-jocher commited on
Commit
dd33d2a
·
unverified ·
1 Parent(s): 13a09fa

Update datasets.py

Browse files
Files changed (1) hide show
  1. 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. See %s' % (path, help_url))
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)