From 8679baa5ec66c715920752562748ae53a49f4836 Mon Sep 17 00:00:00 2001 From: Cian Monnin <113541912+CMonnin@users.noreply.github.com> Date: Mon, 19 Jan 2026 11:12:16 -0500 Subject: [PATCH] Handle TimeoutError in version check --- dcm2bids/utils/tools.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dcm2bids/utils/tools.py b/dcm2bids/utils/tools.py index a2ffb3b8..068c9190 100644 --- a/dcm2bids/utils/tools.py +++ b/dcm2bids/utils/tools.py @@ -49,6 +49,10 @@ def check_github_latest(github_repo, timeout=3): "your machine is probably not connected to the Internet.") logger.debug(f"Reason {e.reason}") return "no_internet" + except TimeoutError as e: + logger.warning(f"Timeout") + logger.debug(f"Socket timeout: {e}") + return "no_internet" else: content = json.loads(response.read()) return content["tag_name"]