diff --git a/parallel_orchestrator.py b/parallel_orchestrator.py index 574cbd2c..e04e54f8 100644 --- a/parallel_orchestrator.py +++ b/parallel_orchestrator.py @@ -511,11 +511,14 @@ def _spawn_coding_agent(self, feature_id: int) -> tuple[bool, str]: try: # CREATE_NO_WINDOW on Windows prevents console window pop-ups # stdin=DEVNULL prevents blocking on stdin reads + # encoding="utf-8" and errors="replace" fix Windows CP1252 issues (#138) popen_kwargs = { "stdin": subprocess.DEVNULL, "stdout": subprocess.PIPE, "stderr": subprocess.STDOUT, "text": True, + "encoding": "utf-8", + "errors": "replace", "cwd": str(AUTOCODER_ROOT), # Run from autocoder root for proper imports "env": {**os.environ, "PYTHONUNBUFFERED": "1"}, } @@ -600,11 +603,14 @@ def _spawn_testing_agent(self) -> tuple[bool, str]: try: # CREATE_NO_WINDOW on Windows prevents console window pop-ups # stdin=DEVNULL prevents blocking on stdin reads + # encoding="utf-8" and errors="replace" fix Windows CP1252 issues (#138) popen_kwargs = { "stdin": subprocess.DEVNULL, "stdout": subprocess.PIPE, "stderr": subprocess.STDOUT, "text": True, + "encoding": "utf-8", + "errors": "replace", "cwd": str(AUTOCODER_ROOT), "env": {**os.environ, "PYTHONUNBUFFERED": "1"}, } @@ -658,11 +664,14 @@ async def _run_initializer(self) -> bool: # CREATE_NO_WINDOW on Windows prevents console window pop-ups # stdin=DEVNULL prevents blocking on stdin reads + # encoding="utf-8" and errors="replace" fix Windows CP1252 issues (#138) popen_kwargs = { "stdin": subprocess.DEVNULL, "stdout": subprocess.PIPE, "stderr": subprocess.STDOUT, "text": True, + "encoding": "utf-8", + "errors": "replace", "cwd": str(AUTOCODER_ROOT), "env": {**os.environ, "PYTHONUNBUFFERED": "1"}, } diff --git a/start.py b/start.py index a230d13b..bc1c6263 100644 --- a/start.py +++ b/start.py @@ -231,7 +231,9 @@ def run_spec_creation(project_dir: Path) -> bool: check=False, # Don't raise on non-zero exit cwd=str(Path(__file__).parent), # Run from project root stderr=subprocess.PIPE, - text=True + text=True, + encoding="utf-8", # Fix Windows CP1252 encoding issue (#138) + errors="replace", ) # Check for authentication errors in stderr @@ -400,7 +402,9 @@ def run_agent(project_name: str, project_dir: Path) -> None: cmd, check=False, stderr=subprocess.PIPE, - text=True + text=True, + encoding="utf-8", # Fix Windows CP1252 encoding issue (#138) + errors="replace", ) # Check for authentication errors diff --git a/start_ui.py b/start_ui.py index 3e619c13..7000309a 100644 --- a/start_ui.py +++ b/start_ui.py @@ -127,7 +127,9 @@ def check_node() -> bool: result = subprocess.run( ["node", "--version"], capture_output=True, - text=True + text=True, + encoding="utf-8", # Fix Windows CP1252 encoding issue (#138) + errors="replace", ) print(f" Node.js version: {result.stdout.strip()}") except Exception: