Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
WenjieDu committed Sep 13, 2024
1 parent 6bcdaea commit a59acec
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pypots/utils/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@

import logging
import os
import sys

print(f"default encoding: {sys.getdefaultencoding()}")
if os.getenv("PYTHONIOENCODING") != "UTF-8":
cmd = [sys.executable, *sys.argv]
os.execvpe(cmd[0], cmd, {**os.environ, "PYTHONIOENCODING": "UTF-8"})
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)

LEVELS = {
"debug": logging.DEBUG,
Expand Down

0 comments on commit a59acec

Please sign in to comment.