From 9d071d24d448c92faa551847067b02b0eb696b9f Mon Sep 17 00:00:00 2001 From: Tai An Date: Sat, 5 Sep 2026 06:07:22 -0700 Subject: [PATCH] fix(audio_io): remove unreachable duplicate except in torchcodec probe The torchcodec import probe had two identical `except Exception` handlers. The first (silent) one shadows the second, so the handler that logs the import error was dead code. Drop the redundant silent handler so the intended error message is emitted on failure. --- lightx2v/utils/audio_io.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/lightx2v/utils/audio_io.py b/lightx2v/utils/audio_io.py index 4c97f4dfe..23867f55f 100644 --- a/lightx2v/utils/audio_io.py +++ b/lightx2v/utils/audio_io.py @@ -15,8 +15,6 @@ def _torchaudio_decode_available() -> bool: if _TORCHAUDIO_DECODE_AVAILABLE is None: try: import torchcodec # noqa: F401 - except Exception: - _TORCHAUDIO_DECODE_AVAILABLE = False except Exception as e: print(f"Error importing torchcodec: {e}") _TORCHAUDIO_DECODE_AVAILABLE = False