From 9d3e95d77c7d4f228909be696efcd42383cd24e3 Mon Sep 17 00:00:00 2001 From: sogoagain Date: Wed, 12 Jan 2022 00:50:32 +0900 Subject: [PATCH] [bugfix] prevent UnicodeDecodeError errors when opening log file in feature_init.py open log file as a raw byte stream in feature_init.py (fixes #23989) --- test/functional/feature_init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/feature_init.py b/test/functional/feature_init.py index 16815c1afcd..4b56b0c26b9 100755 --- a/test/functional/feature_init.py +++ b/test/functional/feature_init.py @@ -93,7 +93,7 @@ class InitStressTest(BitcoinTestFramework): additional_lines = random.randint(1, num_total_logs) self.log.debug(f"Starting node and will exit after {additional_lines} lines") node.start(extra_args=['-txindex=1']) - logfile = open(node.debug_log_path, 'r', encoding='utf8') + logfile = open(node.debug_log_path, 'rb') MAX_SECS_TO_WAIT = 10 start = time.time()