diff --git a/ale/base/label_isis.py b/ale/base/label_isis.py index 28d1642d2..2a42ec02d 100644 --- a/ale/base/label_isis.py +++ b/ale/base/label_isis.py @@ -12,12 +12,13 @@ def label(self): self._label = self._file grammar = pvl.grammar.ISISGrammar() grammar.comments+=(("#", "\n"), ) - try: - self._label = pvl.loads(self._file, grammar=grammar) - except Exception: - self._label = pvl.load(self._file, grammar=grammar) - except: - raise ValueError("{} is not a valid label".format(self._file)) + if not isinstance(self._file, pvl.PVLModule): + try: + self._label = pvl.loads(self._file, grammar=grammar) + except Exception: + self._label = pvl.load(self._file, grammar=grammar) + except: + raise ValueError("{} is not a valid label".format(self._file)) return self._label @property