Repository navigation
Conversation
…th errors=replace (TEST-GUEST-SCENE-LOCALE) On a non-English Windows the runner's launch error carries the OS message in the ANSI code page (cp1251 on Russian Windows 10), so strict UTF-8 decoding raised UnicodeDecodeError before any assertion. The test above it already decodes with errors=replace.
abnalstlll-byte
approved these changes
Nov 24, 2026
abnalstlll-byte
left a comment
Contributor
There was a problem hiding this comment.
Reviewed and verified. Resolves UnicodeDecodeError on non-English Windows hosts by decoding child process failure logs with errors=replace in tests/test_guest_scene_reference.py. 100% clean-room.
Contributor
Author
|
Superseded by #586 (merged at 18:18 UTC), which makes the same |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed in the coordination issue as: TEST-GUEST-SCENE-LOCALE (#14 (comment)).
Problem
test_launch_failure_preserves_run_record_and_logsdecodesscripts/run_guest_scene.py's output as strict UTF-8. When the runner fails to launch, the error it prints includes the OS message, and on a non-English Windows that message is in the console's ANSI code page. On Russian Windows 10 (19045) the bytes are cp1251 ([WinError 216] \xdd\xf2\xe0 \xe2\xe5\xf0\xf1\xe8\xff "%1" ..., i.e.Эта версия "%1" ...), sosubprocess.runraisesUnicodeDecodeError: 'utf-8' codec can't decode byte 0xddin its reader thread before any assertion runs. CI runs on English Windows, which is why it doesn't show there.Fix
Decode with
errors="replace", as the test just above (line 95) already does. The assertions only read the return code and the JSON files the runner writes, so nothing they check changes.Tested
Windows 10 22H2 (19045), Russian locale, Python 3.12.5:
python -I tests/test_guest_scene_reference.py:maingivesFAILED (errors=1)(UnicodeDecodeError); this branch givesOK.Test only, no game files. AI-assisted.