diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c998fb57..e9b550aea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ - More consistency in how local and remote image conversions are performed in Girder ([#1238](../../pull/1238)) - Support showing data from subkeys in annotation lists ([#1241](../../pull/1241)) +### Bug Fixes +- The nd2 reader throws a different exception with JP2 files ([#1242](../../pull/1242)) + ## 1.23.1 ### Improvements diff --git a/sources/nd2/large_image_source_nd2/__init__.py b/sources/nd2/large_image_source_nd2/__init__.py index 291f5767a..b9a4552b0 100644 --- a/sources/nd2/large_image_source_nd2/__init__.py +++ b/sources/nd2/large_image_source_nd2/__init__.py @@ -142,7 +142,7 @@ def __init__(self, path, **kwargs): # We use dask to allow lazy reading of large images try: self._nd2array = self._nd2.to_dask(copy=False, wrapper=False) - except TypeError as exc: + except (TypeError, ValueError) as exc: self.logger.debug('Failed to read nd2 file: %s', exc) raise TileSourceError('File cannot be opened via the nd2 source.') arrayOrder = list(self._nd2.sizes)