Skip to content

Commit

Permalink
Merge pull request #664 from girder/harden-openslide-error
Browse files Browse the repository at this point in the history
Harden on openslide errors.
  • Loading branch information
manthey authored Oct 1, 2021
2 parents 89b7979 + 6d1892a commit 9bd25e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Change Log

## Unreleased
## Version 1.8.1

### Improvements
- Allow GDAL source to read non-geospatial files (#655)
- Rename Exceptions to Errors, improve file-not-found errors (#657)
- More robust OME TIFF handling (#660)
- large-image-converter can exclude specified associated images (#663)
- Harden on some openslide errors (#664)

### Bug Fixes
- getBandInformation could fail on high bands in some cases (#651)
Expand Down
2 changes: 2 additions & 0 deletions sources/openslide/large_image_source_openslide/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ def _getAssociatedImage(self, imageKey):
try:
return self._openslide.associated_images[imageKey]
except openslide.lowlevel.OpenSlideError:
# Reopen handle after a lowlevel error
self._openslide = openslide.OpenSlide(self._largeImagePath)
return None
bytePath = self._largeImagePath
if not isinstance(bytePath, bytes):
Expand Down

0 comments on commit 9bd25e0

Please sign in to comment.