From 9d1f8863059d49d88438db1000f3f9fafda72b66 Mon Sep 17 00:00:00 2001 From: oop7 <110548351+oop7@users.noreply.github.com> Date: Sat, 29 Nov 2025 13:58:16 +0200 Subject: [PATCH] Update subprocess to use encoding and error handling Replaces 'text' and 'universal_newlines' parameters with 'encoding="utf-8"' and 'errors="replace"' in subprocess.Popen for improved output handling. --- src/core/ytsage_downloader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/ytsage_downloader.py b/src/core/ytsage_downloader.py index d2c4696..cadbd02 100644 --- a/src/core/ytsage_downloader.py +++ b/src/core/ytsage_downloader.py @@ -337,9 +337,9 @@ class DownloadThread(QThread): cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - text=True, bufsize=1, # Line buffered - universal_newlines=True, + encoding="utf-8", + errors="replace", creationflags=SUBPROCESS_CREATIONFLAGS, )