Skip to content

Commit

Permalink
Merge pull request #188 from compomics/fix/deeplc-logging-encoding
Browse files Browse the repository at this point in the history
Fix encoding error in DeepLC logging
  • Loading branch information
RalfG authored Sep 17, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 709366a + c3daf98 commit 0095fa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ms2rescore/feature_generators/deeplc.py
Original file line number Diff line number Diff line change
@@ -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())))

0 comments on commit 0095fa8

Please sign in to comment.