From a6062445be2ab6ae70229fd85dcfcd5042555a7c Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Wed, 12 Jan 2022 00:50:32 +0900 Subject: [PATCH] merge bitcoin#24039: prevent UnicodeDecodeError when opening log file in feature_init.py --- 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 16815c1afc..4b56b0c26b 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()