From e02dd3c2c19a103d405123595cdc2fce8efc0497 Mon Sep 17 00:00:00 2001 From: Gabriele Girelli Date: Sun, 25 Oct 2020 19:05:31 +0100 Subject: [PATCH] Fixed missing filename path. --- nd2reader/reader.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nd2reader/reader.py b/nd2reader/reader.py index f97e1a0..4e14f42 100644 --- a/nd2reader/reader.py +++ b/nd2reader/reader.py @@ -22,16 +22,18 @@ class ND2Reader(FramesSequenceND): """ super(ND2Reader, self).__init__() + self.filename = "" + if isinstance(fh, str): if not fh.endswith(".nd2"): raise InvalidFileType( ("The file %s you want to read with nd2reader" % fh) + " does not have extension .nd2." ) + self.filename = fh fh = open(fh, "rb") self._fh = fh - self.filename = "" self._parser = Parser(self._fh)