diff --git a/src/ifcopenshell-python/ifcopenshell/__init__.py b/src/ifcopenshell-python/ifcopenshell/__init__.py index d0484a6d7e..b87667cb48 100644 --- a/src/ifcopenshell-python/ifcopenshell/__init__.py +++ b/src/ifcopenshell-python/ifcopenshell/__init__.py @@ -85,8 +85,8 @@ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "lib", p try: from . import ifcopenshell_wrapper -except Exception: - raise ImportError("IfcOpenShell not built for '%s'" % python_distribution) +except Exception as e: + raise ImportError("IfcOpenShell not built for '%s' (%s)" % (python_distribution, e)) from e # `_file`, `_stream` is used only for annotations inside this file, # see https://github.com/microsoft/pyright/discussions/9065.