From f2e0af378fd2c87c71c5384020f37c4036f0cbd4 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Tue, 29 Jun 2021 11:16:29 -0500 Subject: [PATCH] Addressing case where is not present in surface HDF5 groups. --- openmc/surface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openmc/surface.py b/openmc/surface.py index 70fd008318..b2f3c6710c 100644 --- a/openmc/surface.py +++ b/openmc/surface.py @@ -454,8 +454,8 @@ class Surface(IDManagerMixin, ABC): """ # If this is a DAGMC surface, do nothing for now - geom_type = group['geom_type'][()].decode() - if geom_type == 'dagmc': + geom_type = group.get('geom_type') + if geom_type and geom_type[()].decode() == 'dagmc': return surface_id = int(group.name.split('/')[-1].lstrip('surface '))