From 29ccf02d86ea2c1cfac7a3e8206305fa9da23540 Mon Sep 17 00:00:00 2001 From: Alessandro Candido Date: Tue, 29 Oct 2024 12:27:26 +0100 Subject: [PATCH] fix: Avoid logging for missing backends Restore 95c71fa3b413e30f6d7577c64655626a1ba5b3f1 after removal in 2fdbf852c3ce9f1d734e9b81bc6bd93284bd73fb --- src/qibo/backends/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qibo/backends/__init__.py b/src/qibo/backends/__init__.py index f8b10e413c..1a7709d725 100644 --- a/src/qibo/backends/__init__.py +++ b/src/qibo/backends/__init__.py @@ -329,8 +329,7 @@ def construct_backend(backend, **kwargs) -> Backend: # pylint: disable=R1710 # pylint: disable=unsupported-membership-test if provider not in e.msg: raise e - raise_error( - MissingBackend, + raise MissingBackend( f"The '{backend}' backends' provider is not available. Check that a Python " + f"package named '{provider}' is installed, and it is exposing valid Qibo " + "backends.",