diff --git a/iohub/convert.py b/iohub/convert.py index 164f98a8..fa875a09 100644 --- a/iohub/convert.py +++ b/iohub/convert.py @@ -310,7 +310,10 @@ def _get_pos_names(self): if self.p > 1: self.pos_names = [] for p in range(self.p): - name = self.reader.stage_positions[p].get("Label") or p + try: + name = self.reader.stage_positions[p]["Label"] + except (IndexError, KeyError): + name = p self.pos_names.append(name) else: self.pos_names = ["0"]