When a delayed group tally such as 'decay-rate' is present in an mgxs.Library object, we rely on num_delayed_groups being greater than zero. When creating the tallies, a mysterious error arises if a user has forgot to set the number of delayed groups to the correct value:
File "/home/gavin/.local/lib/python3.10/site-packages/openmc/mgxs/library.py", line 588, in add_to_tallies_file
for tally in mgxs.tallies.values():
File "/home/gavin/.local/lib/python3.10/site-packages/openmc/mgxs/mgxs.py", line 594, in tallies
zip(self.scores, self.tally_keys, self.filters, estimators)
TypeError: 'NoneType' object is not iterable
We should explicitly check for this condition and raise a more useful message if so.
Description
When a delayed group tally such as 'decay-rate' is present in an
mgxs.Library
object, we rely onnum_delayed_groups
being greater than zero. When creating the tallies, a mysterious error arises if a user has forgot to set the number of delayed groups to the correct value:We should explicitly check for this condition and raise a more useful message if so.