Pull requests / #3092

#3092 fix: strata_bench crashed reading CMakeLists.txt on GBK-default Windows

open · @gg320324492-lgtm · 0 commentaires · Sur GitHub

BenchmarksSetup & installNVIDIA / CUDAWindows

Description

## What it changes
One line: `project_version()` in `tools/strata_bench.py` read `CMakeLists.txt` with the system default encoding. On a Chinese Windows 11 install the default code page is GBK, so the UTF-8 BOM in `CMakeLists.txt` raised `UnicodeDecodeError: 'gbk' codec can't decode byte 0xbf in position 2` and the bench exited (code 1) before the suite even started. It now reads with `encoding="utf-8-sig", errors="replace"`.

## What it leaves alone
Nothing else. The rest of the file's reads already declare encodings (`utf-8` / `utf-8-sig`); this was the only one that did not.

## How I checked
On an RTX 5090 / Windows 11 (GBK default) box: running `python tools/strata_bench.py` against a live server failed with the decode error before the change, and completed the whole suite (chat, 4K, 16K, agent) after it.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Sur le site

Liens install, modèles, releases.