diff --git a/tools/stage_timeline.py b/tools/stage_timeline.py index 9b37373f10..b54d81f8bc 100644 --- a/tools/stage_timeline.py +++ b/tools/stage_timeline.py @@ -97,4 +97,8 @@ def main(): if __name__ == "__main__": + try: # a redirected stdout is strict ANSI code page under -I; write '?' for what it cannot encode + sys.stdout.reconfigure(errors="replace") + except (AttributeError, ValueError, OSError): + pass sys.exit(main())