diff --git a/aiidalab_ispg/app/input_widgets.py b/aiidalab_ispg/app/input_widgets.py index cad5538..99211f9 100644 --- a/aiidalab_ispg/app/input_widgets.py +++ b/aiidalab_ispg/app/input_widgets.py @@ -3,7 +3,7 @@ from enum import Enum, unique import ipywidgets as ipw -import traitlets +import traitlets as tl from aiida.common import NotExistent from aiida.orm import load_code @@ -240,7 +240,7 @@ def reset(self): class WignerSamplingSettings(ipw.VBox): - disabled = traitlets.Bool(default=False) + disabled = tl.Bool(default=False) title = ipw.HTML( """
@@ -279,7 +279,7 @@ def __init__(self): super().__init__([self.title, self.nwigner, self.wigner_low_freq_thr]) - @traitlets.observe("disabled") + @tl.observe("disabled") def _observer_disabled(self, change): if change["new"]: self.nwigner.disabled = True @@ -333,6 +333,11 @@ def _set_default_codes(self, _=None): return except (NotExistent, ValueError): pass + except tl.TraitError: + # This can happen if one of the code/computers is not configured/enabled or hidden + # In practice, this happened to me locally when importing from production DB. + # https://github.com/ispg-group/aiidalab-ispg/issues/240 + pass if not self.orca.value: print("WARNING: ORCA code has not been found locally")