From c3daf986901c60d5dabe2758e64643401adc2908 Mon Sep 17 00:00:00 2001 From: Ralf Gabriels Date: Tue, 17 Sep 2024 14:54:06 +0200 Subject: [PATCH] Fix encoding error in DeepLC logging --- ms2rescore/feature_generators/deeplc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ms2rescore/feature_generators/deeplc.py b/ms2rescore/feature_generators/deeplc.py index 30bea716..bea210c0 100644 --- a/ms2rescore/feature_generators/deeplc.py +++ b/ms2rescore/feature_generators/deeplc.py @@ -139,7 +139,7 @@ def add_features(self, psm_list: PSMList) -> None: # Disable wild logging to stdout by Tensorflow, unless in debug mode with contextlib.redirect_stdout( - open(os.devnull, "w") + open(os.devnull, "w", encoding="utf-8") ) if not self._verbose else contextlib.nullcontext(): # Make new PSM list for this run (chain PSMs per spectrum to flat list) psm_list_run = PSMList(psm_list=list(chain.from_iterable(psms.values())))