From 7b3ef012b9b1eef893a251b8dd8eaa08aafc7db9 Mon Sep 17 00:00:00 2001 From: recklesscoder <57289227+recklesscoder@users.noreply.github.com> Date: Sun, 9 Oct 2022 04:10:22 +0200 Subject: [PATCH] Factorio: Prevent pipes from breaking on invalid UTF-8 in client (#1078) --- FactorioClient.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/FactorioClient.py b/FactorioClient.py index 6797578a..1efca05d 100644 --- a/FactorioClient.py +++ b/FactorioClient.py @@ -211,6 +211,8 @@ async def game_watcher(ctx: FactorioContext): def stream_factorio_output(pipe, queue, process): + pipe.reconfigure(errors="replace") + def queuer(): while process.poll() is None: text = pipe.readline().strip()