diff --git a/transcoder/transcode_dvd.py b/transcoder/transcode_dvd.py index feb8dff..e8b31a4 100755 --- a/transcoder/transcode_dvd.py +++ b/transcoder/transcode_dvd.py @@ -294,7 +294,7 @@ def run_and_log_handbrake(dvd: Dvd, command) -> bool: # Handbrake often exits with returncode 0 even though it logged an error and transcoding was not successful def check_handbrake_log_for_error(dvd: Dvd): - with open(dvd.log_file, "r") as log_file: + with open(dvd.log_file, "r", encoding="utf-8", errors="ignore") as log_file: for line in log_file: if line.startswith("Encode failed"): return True @@ -328,7 +328,7 @@ def find_series_titles(dvd: Dvd): if proc.returncode != 0: return None - stdout = proc.stdout.decode("utf-8", errors="replace") + stdout = proc.stdout.decode("utf-8", errors="ignore") json_str = "" in_json = False