From 4d0e5f6aee49a95397ecea57261c5adac34f99e8 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 7 Aug 2026 17:53:16 +0500 Subject: [PATCH] ifcopenshell.file: improve missing attribute error msg --- src/ifcopenshell-python/ifcopenshell/file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/ifcopenshell/file.py b/src/ifcopenshell-python/ifcopenshell/file.py index f126f85e62..59fbc46bde 100644 --- a/src/ifcopenshell-python/ifcopenshell/file.py +++ b/src/ifcopenshell-python/ifcopenshell/file.py @@ -698,7 +698,7 @@ class file_mixin: if attr[0:6] == "create": return functools.partial(self.create_entity, attr[6:]) else: - raise AttributeError + raise AttributeError(f"'file' object has no attribute '{attr}'.") def __getitem__(self, key: Union[numbers.Integral, str, bytes]) -> ifcopenshell.entity_instance: if isinstance(key, numbers.Integral):