mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-04-30 01:29:07 -05:00
Fix UnicodeDecodeError on Windows in tito module complete (fixes #1184)
Add encoding='utf-8' and errors='replace' to subprocess.run() calls in workflow.py so unit and integration test output decode correctly on Windows (cp1252) when output contains UTF-8 characters. Co-authored-by: Pratham-ja <114498234+Pratham-ja@users.noreply.github.com>
This commit is contained in:
@@ -908,6 +908,8 @@ class ModuleWorkflowCommand(BaseCommand):
|
||||
[sys.executable, str(dev_file.absolute())],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
encoding="utf-8",
|
||||
errors="replace",
|
||||
cwd=project_root,
|
||||
env=env
|
||||
)
|
||||
@@ -964,6 +966,8 @@ class ModuleWorkflowCommand(BaseCommand):
|
||||
],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
encoding="utf-8",
|
||||
errors="replace",
|
||||
cwd=project_root
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user