Skip to content

Commit 26e1188

Browse files
authored
[Fix] Use utf-8 encoding in entrypoints/openai/run_batch.py (#5606)
1 parent a3e8a05 commit 26e1188

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vllm/entrypoints/openai/run_batch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ async def read_file(path_or_url: str) -> str:
5858
session.get(path_or_url) as resp:
5959
return await resp.text()
6060
else:
61-
with open(path_or_url, "r") as f:
61+
with open(path_or_url, "r", encoding="utf-8") as f:
6262
return f.read()
6363

6464

@@ -71,7 +71,7 @@ async def write_file(path_or_url: str, data: str) -> None:
7171
# We should make this async, but as long as this is always run as a
7272
# standalone program, blocking the event loop won't effect performance
7373
# in this particular case.
74-
with open(path_or_url, "w") as f:
74+
with open(path_or_url, "w", encoding="utf-8") as f:
7575
f.write(data)
7676

7777

0 commit comments

Comments
 (0)