From b088cf8128aac461361a5c5291810458d1778283 Mon Sep 17 00:00:00 2001 From: Hagen Wierstorf Date: Thu, 16 Nov 2023 11:52:24 +0100 Subject: [PATCH] Catch backend errors --- audb/core/utils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/audb/core/utils.py b/audb/core/utils.py index 88c704d9..484dd44a 100644 --- a/audb/core/utils.py +++ b/audb/core/utils.py @@ -72,10 +72,14 @@ def _lookup( """ for repository in config.REPOSITORIES: - backend = access_backend(repository) + try: + backend = access_backend(repository) + except audbackend.BackendError: + continue + header = backend.join('/', name, 'db.yaml') - if backend.exists(header, version): + if backend.exists(header, version, suppress_backend_errors=True): return repository, backend raise RuntimeError(