File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ def _get_valid_range(self):
134
134
try :
135
135
valid_range = [self ._image .valid_min ,
136
136
self ._image .valid_max ]
137
- except AttributeError :
137
+ except ( AttributeError , KeyError ) :
138
138
valid_range = [info .min , info .max ]
139
139
if valid_range [0 ] < info .min or valid_range [1 ] > info .max :
140
140
raise ValueError ('Valid range outside input '
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ def _get_valid_range(self):
95
95
info = np .iinfo (ddt .type )
96
96
try :
97
97
valid_range = self ._image .attrs ['valid_range' ]
98
- except AttributeError :
98
+ except ( AttributeError , KeyError ) :
99
99
valid_range = [info .min , info .max ]
100
100
else :
101
101
if valid_range [0 ] < info .min or valid_range [1 ] > info .max :
You can’t perform that action at this time.
0 commit comments