From dd33d2ab77bb65845bb12a99fba81fabc03a457d Mon Sep 17 00:00:00 2001 From: Glenn Jocher <glenn.jocher@ultralytics.com> Date: Thu, 9 Jul 2020 16:28:20 -0700 Subject: [PATCH] Update datasets.py --- utils/datasets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/datasets.py b/utils/datasets.py index c8619f9..9777e5c 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -294,8 +294,8 @@ class LoadImagesAndLabels(Dataset): # for training/testing raise Exception('%s does not exist' % p) path = p # *.npy dir self.img_files = [x.replace('/', os.sep) for x in f if os.path.splitext(x)[-1].lower() in img_formats] - except: - raise Exception('Error loading data from %s. See %s' % (path, help_url)) + except Exception as e: + raise Exception('Error loading data from %s: %s\nSee %s' % (path, e, help_url)) n = len(self.img_files) assert n > 0, 'No images found in %s. See %s' % (path, help_url)