diff --git a/src/napari_mm3/_deriving_widgets.py b/src/napari_mm3/_deriving_widgets.py index 2f598b8..2a040ec 100644 --- a/src/napari_mm3/_deriving_widgets.py +++ b/src/napari_mm3/_deriving_widgets.py @@ -416,10 +416,13 @@ def _get_most_recent_run(self): return {} # get the most recent run of the relevant widget. old_params = {} - for historic_widget_name, _, params in reversed(history): - if historic_widget_name == self.parent.name: - old_params = params - break + try: + for historic_widget_name, _, params in reversed(history): + if historic_widget_name == self.parent.name: + old_params = params + break + except AttributeError: + pass return old_params @@ -445,7 +448,7 @@ def _save_settings(self): """ try: widget_name = self.parent.name - except: + except AttributeError: warning('Could not extract widget name to save settings.') widget_name = '' history = []