diff options
Diffstat (limited to 'parse/dir_map.py')
-rw-r--r-- | parse/dir_map.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/parse/dir_map.py b/parse/dir_map.py index a8d2a83..231d21a 100644 --- a/parse/dir_map.py +++ b/parse/dir_map.py | |||
@@ -96,7 +96,10 @@ class DirMap(object): | |||
96 | return | 96 | return |
97 | 97 | ||
98 | with open(path, 'rb') as f: | 98 | with open(path, 'rb') as f: |
99 | data = np.loadtxt(f, delimiter=",") | 99 | try: |
100 | data = np.loadtxt(f, delimiter=",") | ||
101 | except Exception as e: | ||
102 | raise IOError("Cannot load '%s': %s" % (path, e.message)) | ||
100 | 103 | ||
101 | # Convert to tuples of ints if possible, else floats | 104 | # Convert to tuples of ints if possible, else floats |
102 | values = [map(lambda a:a if a%1 else int(a), t) for t in data] | 105 | values = [map(lambda a:a if a%1 else int(a), t) for t in data] |