mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2499] [Bug]: BENCH.bat / strata_bench.py crashes on Windows with a non-UTF-8 locale (UnicodeDecodeError reading CMakeLists.txt) #1015
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1015
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hasifumi on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2499
What happened
BENCH.bat(tools/strata_bench.py) stops right after it finds the server on Windows with a Japanese locale (ANSI code page cp932). It never runs the suite:Steps: a v0.1.44.1 checkout on Windows 11 (Japanese), then
BENCH.bat(or.venv\Scripts\python.exe tools\strata_bench.py --url http://127.0.0.1:8080).Cause:
CMakeLists.txtstarts with a UTF-8 BOM (ef bb bf).project_version()callsread_text()with no encoding, so Python uses the locale's code page (cp932 here). Theexcept OSErroraround it does not catchUnicodeDecodeError(aValueError), so the whole run stops instead of reporting no version. Other non-UTF-8 code pages (cp936, cp949, cp1252...) should hit the same error. Linux and English Windows usually read UTF-8, which is probably why it has not shown up.Workaround:
set PYTHONUTF8=1beforeBENCH.bat. With it, the run finishes normally.Possible fix:
(ROOT / "CMakeLists.txt").read_text(encoding="utf-8-sig"), and/orexcept (OSError, ValueError)so that a version that cannot be read never stops the benchmark. I only checked this one call. The/procreads in the same file are Linux-only, so they are not affected.Strata version, GPU, OS
Strata v0.1.44.1 (engine 0.1.44.1, CUDA 13.0 ready-made), RTX 5060 Ti 16 GB, Windows 11 Pro 26200 (Japanese), Python 3.11
Engine log
Not relevant: the engine runs fine, and only the benchmark client fails.
@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.