From 5466d0d9a61f31d899faae86518dc96651434356 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Wed, 17 Apr 2024 12:59:52 -0700 Subject: [PATCH] Use errors='replace' with subprocess (#3096) --- reflex/utils/processes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/reflex/utils/processes.py b/reflex/utils/processes.py index f8950843b..67887754f 100644 --- a/reflex/utils/processes.py +++ b/reflex/utils/processes.py @@ -145,6 +145,7 @@ def new_process(args, run: bool = False, show_logs: bool = False, **kwargs): "stdout": None if show_logs else subprocess.PIPE, "universal_newlines": True, "encoding": "UTF-8", + "errors": "replace", # Avoid UnicodeDecodeError in unknown command output **kwargs, } console.debug(f"Running command: {args}")