From bd292be0c0fcdd139576fd83c8715af2eab4ca4f Mon Sep 17 00:00:00 2001 From: Richard Zou Date: Thu, 15 Jan 2026 15:01:41 -0500 Subject: [PATCH] [BugFix] Python file source reading can fail on UnicodeDecodeError (#32416) Signed-off-by: Richard Zou --- vllm/compilation/backends.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/compilation/backends.py b/vllm/compilation/backends.py index dec20cdc8..f06047be6 100644 --- a/vllm/compilation/backends.py +++ b/vllm/compilation/backends.py @@ -606,7 +606,7 @@ class VllmBackend: try: with open(filepath) as f: hash_content.append(f.read()) - except OSError: + except (OSError, UnicodeDecodeError): logger.warning("Failed to read file %s", filepath) continue code_hash = hashlib.sha256("\n".join(hash_content).encode()).hexdigest()