fix(web): decode pip output as UTF-8 so update check/upgrade work on Windows - #313
Merged
Conversation
…Windows The configure "About mureo" update check and one-click upgrade worked on macOS/Linux but failed on Windows. All three capturing pip subprocess calls used `text=True` without `encoding=`, so text mode decoded pip's output with the platform locale codec — cp932 on a Japanese Windows — while pip emits UTF-8 (its `--report -` JSON, install logs). Non-cp932 bytes raised UnicodeDecodeError; in `_run_pip_report` that error was not caught (only TimeoutExpired/OSError were), so the background update check silently died, and in `run_upgrade_all` it escaped the (TimeoutExpired, OSError) handler and broke the upgrade. Force `encoding="utf-8", errors="replace"` on the three capturing pip calls: - web/version_check.py `_run_pip_report` (the About update check) - web/upgrade_action.py `run_upgrade_all` (the one-click upgrade) - cli/upgrade_cmd.py `_pip_is_available` (`mureo upgrade` CLI, same latent bug) UTF-8 matches pip's actual output on every platform, so macOS/Linux behaviour is unchanged; `errors="replace"` guarantees decoding never raises even on genuinely malformed bytes (it then degrades to the existing graceful-failure paths). The two streaming calls (`_run_pip_install`, `_bootstrap_pip`) capture nothing and need no change. Regression tests assert the encoding kwargs on all three calls. python-reviewer: APPROVE. Claude-Session: https://claude.ai/code/session_01NxBrN8Qn53Tpivt9SumdGn
Merged
hyoshi
added a commit
that referenced
this pull request
Jun 22, 2026
Release 0.10.10 — two Windows-surfaced field fixes: (#313) pip output decoded as UTF-8 so the About update check + one-click upgrade work under cp932; (#315) the read-only Reports view tolerates nonconforming campaign entries instead of blanking the dashboard. Version bumped across pyproject / __init__ / .claude-plugin; CHANGELOG updated.
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.
Problem
The configure "About mureo" update check + one-click upgrade work on macOS/Linux but fail on Windows. The three capturing pip
subprocess.run(text=True)calls omitencoding=, so text mode decodes pip's UTF-8 output with the locale codec — cp932 on a Japanese Windows — raisingUnicodeDecodeError. In_run_pip_reportthat error isn't caught (only TimeoutExpired/OSError), so the update check silently dies; inrun_upgrade_allit escapes the handler and breaks the upgrade.Fix
Add
encoding="utf-8", errors="replace"to the three capturing pip calls (version_check_run_pip_report, upgrade_actionrun_upgrade_all, cli_pip_is_available). UTF-8 is pip's actual output encoding on every platform (no macOS/Linux behaviour change);errors="replace"makes decoding never raise. Regression tests assert the encoding kwargs on all three calls.python-reviewer: APPROVE (no CRITICAL/HIGH).
https://claude.ai/code/session_01NxBrN8Qn53Tpivt9SumdGn