mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-07-16 20:50:18 +00:00
eddb17028d
_run_git used subprocess.run(text=True) without an explicit encoding, so on Chinese Windows (and other non-UTF-8 codepages) git stdout was decoded with the locale codepage. _dirty_suffix() runs `git diff --binary HEAD`, whose binary bytes are not valid GBK, raising UnicodeDecodeError in the subprocess reader thread. That left r.stdout = None, so `r.stdout.strip()` raised AttributeError during module import of api.updates, crashing server.py before it could bind its port. Force UTF-8 decoding with errors=replace and guard against None defensively.