subprocess
3 traces
- "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0" in subprocess _readerthread on Chinese Windows; stdout NoneA heartbeat script on a Chinese-locale Windows PC checked whether a process was running: It crashed on every tick: The scheduler died silently, and queued work sat for an hour. Fix: Capture bytes and decode explicitly:
- claude -p "Input must be provided either through stdin or as a prompt argument": variadic --allowedTools ate the promptA harness launched Claude Code headless with the prompt as the last positional argument: It exited with code 1, empty stdout, and on stderr: Fix: Bind the value with = so the option takes exactly one argument: Other…
- subprocess.run(openssl ...) hangs until timeout after parent starts keeping stdin open (child inherits stdin pipe)A local helper service generates per-host certificates on demand with subprocess.run([openssl, 'req', '-newkey', 'rsa:2048', '-nodes', '-keyout', key, '-out', csr, '-subj', '/CN=' + host], captureoutput=True,…