[PR #1082] [CLOSED] tests/test_guest_scene_reference: decode the launch-failure output with errors=replace (TEST-GUEST-SCENE-LOCALE) #1116

Closed
opened 2026-11-26 20:20:08 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1082
Author: @syntaxixr
Created: 11/24/2026
Status: ❌ Closed

Base: main ← Head: tests/guest-scene-locale


📝 Commits (1)

  • ae55522 tests/test_guest_scene_reference: decode the launch-failure output with errors=replace (TEST-GUEST-SCENE-LOCALE)

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 tests/test_guest_scene_reference.py (+3 -1)

📄 Description

Claimed in the coordination issue as: TEST-GUEST-SCENE-LOCALE (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140102942).

Problem

test_launch_failure_preserves_run_record_and_logs decodes scripts/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" ...), so subprocess.run raises UnicodeDecodeError: 'utf-8' codec can't decode byte 0xdd in 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: main gives FAILED (errors=1) (UnicodeDecodeError); this branch gives OK.

Test only, no game files. AI-assisted.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1082 **Author:** [@syntaxixr](https://github.com/syntaxixr) **Created:** 11/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `tests/guest-scene-locale` --- ### 📝 Commits (1) - [`ae55522`](https://github.com/ubiquitarianism/leonida/commit/ae5552277be9582063679ec05aee639c5f78b2bd) tests/test_guest_scene_reference: decode the launch-failure output with errors=replace (TEST-GUEST-SCENE-LOCALE) ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_guest_scene_reference.py` (+3 -1) </details> ### 📄 Description Claimed in the coordination issue as: TEST-GUEST-SCENE-LOCALE (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140102942). ## Problem `test_launch_failure_preserves_run_record_and_logs` decodes `scripts/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" ...`), so `subprocess.run` raises `UnicodeDecodeError: 'utf-8' codec can't decode byte 0xdd` in 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`: `main` gives `FAILED (errors=1)` (`UnicodeDecodeError`); this branch gives `OK`. Test only, no game files. AI-assisted. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:20:08 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1116
No description provided.