diff --git a/src/ifcopenshell-python/ifcopenshell/file.py b/src/ifcopenshell-python/ifcopenshell/file.py index 00d84cc8f9..e6ff395086 100644 --- a/src/ifcopenshell-python/ifcopenshell/file.py +++ b/src/ifcopenshell-python/ifcopenshell/file.py @@ -1047,7 +1047,10 @@ class file: @property def header(self): - return file_header(self, self.wrapped_data.header()) + try: + return file_header(self, self.wrapped_data.header()) + except: + return self.wrapped_data.header @property def storage(self) -> Optional[rocksdb_file_storage]: