From 4f2705bc692a38cd9f70d3257590108627f96ed1 Mon Sep 17 00:00:00 2001 From: Roland Guichard Date: Thu, 27 Jun 2024 16:51:48 +0100 Subject: [PATCH] Fix error messages. --- qadence/extensions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qadence/extensions.py b/qadence/extensions.py index 25283ab89..390ddb8c0 100644 --- a/qadence/extensions.py +++ b/qadence/extensions.py @@ -44,7 +44,7 @@ def _available_backends() -> dict[BackendName, Backend]: try: res[backend] = import_backend(backend) except (ModuleNotFoundError, ImportError) as e: - raise type(e)(f"Failed to import backend {backend_name} due to {e}.") from e + raise type(e)(f"Failed to import backend {backend} due to {e}.") from e logger.debug(f"Found backends: {res.keys()}") return res @@ -67,7 +67,7 @@ def _available_engines() -> dict[Engine, DifferentiableBackend]: try: res[engine] = import_engine(engine) except (ModuleNotFoundError, ImportError) as e: - raise type(e)(f"Failed to import engine {engine_name} due to {e}.") from e + raise type(e)(f"Failed to import engine {engine} due to {e}.") from e logger.debug(f"Found engines: {res.keys()}") return res