Skip to content

Commit

Permalink
Guard against an OME tiff exception.
Browse files Browse the repository at this point in the history
Some files raise a TypeError in the current parsing; the parsing should
be improved, but this at least allows graceful failure until that is
done.
  • Loading branch information
manthey committed Sep 23, 2021
1 parent 44f46e2 commit 8c2df71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sources/ometiff/large_image_source_ometiff/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def _parseOMEInfo(self): # noqa
self._omebase.get('Plane', self._omebase['TiffData']))):
raise TileSourceError(
'OME Tiff contains frames that contain multiple planes')
except (KeyError, ValueError, IndexError):
except (KeyError, ValueError, IndexError, TypeError):
raise TileSourceError('OME Tiff does not contain an expected record')

def getMetadata(self):
Expand Down

0 comments on commit 8c2df71

Please sign in to comment.