fix: use explicit UTF-8 encoding when writing code_interpreter temp script (#3023)

Co-authored-by: octo-patch <octo-patch@github.com>
This commit is contained in:
Octopus
2026-04-20 21:43:47 +08:00
committed by GitHub
parent b4b0a53d1b
commit 116388f931

View File

@@ -1698,7 +1698,7 @@ print(json.dumps(summary, ensure_ascii=False))
try:
tmp_path = os.path.join(work_dir, "_run.py")
with open(tmp_path, "w") as tmp:
with open(tmp_path, "w", encoding="utf-8") as tmp:
tmp.write(full_code)
proc = await asyncio.create_subprocess_exec(