Skip to content

Commit 4f343aa

Browse files
Manamama-Gemini-Cloud-AI-01Gemini AI Agent
andauthored
fix(qwen3): stop masking dependency ImportErrors (#2860)
Co-authored-by: Gemini AI Agent <gemini-ai@google.com>
1 parent 9bc6de0 commit 4f343aa

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

funasr/models/qwen3_asr/model.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,13 @@ def __init__(self, **kwargs):
5353

5454
try:
5555
from qwen_asr import Qwen3ASRModel
56-
except ImportError:
57-
raise ImportError(
58-
"qwen-asr package is required. Install with: pip install qwen-asr"
59-
)
56+
except ImportError as e:
57+
# Only catch if the package itself is missing, not if its dependencies are broken
58+
if "qwen_asr" in str(e):
59+
raise ImportError(
60+
"qwen-asr package is required. Install with: pip install qwen-asr"
61+
) from e
62+
raise e
6063

6164
torch_dtype = self._dtype_map.get(dtype, torch.bfloat16)
6265
fa_kwargs = None

0 commit comments

Comments
 (0)