diff --git a/openmc/weight_windows.py b/openmc/weight_windows.py index b96908747..36c3932fc 100644 --- a/openmc/weight_windows.py +++ b/openmc/weight_windows.py @@ -192,6 +192,8 @@ class WeightWindows(IDManagerMixin): @property def num_energy_bins(self): + if self.energy_bounds is None: + raise ValueError('Energy bounds are not set') return self.energy_bounds.size - 1 @property