Unverified Commit bd292be0 authored by Richard Zou's avatar Richard Zou Committed by GitHub
Browse files

[BugFix] Python file source reading can fail on UnicodeDecodeError (#32416)


Signed-off-by: default avatarRichard Zou <zou3519@gmail.com>
parent 41c544f7
......@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment