Skip to content

Commit

Permalink
Merge pull request #1242 from girder/guard-nd2-jp2
Browse files Browse the repository at this point in the history
The exception raised by jp2 files from the nd2 reader changed
  • Loading branch information
manthey authored Jul 24, 2023
2 parents d74222f + 9589ca8 commit 865f100
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sources/nd2/large_image_source_nd2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 865f100

Please sign in to comment.