mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2792] tools/strata_bench.py: UnicodeDecodeError reading CMakeLists.txt on non-UTF-8 Windows (GBK/cp932), before any measurement #1120
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#1120
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 @Lithivm on GitHub (Oct 16, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2792
tools/strata_bench.py:564(project_version) readsCMakeLists.txtwithPath.read_text()and noencoding=, so it decodes with the OS locale code page. On a Chinese or Japanese Windows (GBK / cp932) the file's UTF-8 BOM makes the read fail andBENCH.batdies before any measurement:CMakeLists.txtstarts with the UTF-8 BOMEF BB BF;0xbfat offset 2 is the third BOM byte. Note it leaves the server it started behind, and the process exits with a traceback rather than a message.setup.py:4649reads the same file withencoding="utf-8":so this looks like a
strata_bench.pyomission rather than an intentional locale dependency. Otherread_text()calls in the file that read repository files are likely to hit the same thing on those systems.Workaround (no source change needed): run with UTF-8 mode on.
Verified: the suite then runs to completion (420 s) and writes a normal report.
Suggested fix: pass
encoding="utf-8"at that call (and audit the otherread_text()calls in the file), or read witherrors="replace"— the value only needs to matchproject(strata VERSION x.y.z).Environment: Windows 11 Pro 10.0.26200, Python 3.10.11, Strata 0.1.44.1 (release engine). A benchmark report produced on this machine is in #2791, which mentions this bug.
@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.