This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author stefanhoelzl
Recipients stefanhoelzl
Date 2021-07-18.08:57:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
compile_files tries to escape non-printable characters in error messages by using sys.stdout.encoding

when using contextlib.redirect_stdout to redirect stdout to io.StringIO as explained in the documentation

compile_file fails, because io.StringIO has encoding set to None.

see the attached file to reproduce the issue
Date User Action Args
2021-07-18 08:57:11stefanhoelzlsetrecipients: + stefanhoelzl
2021-07-18 08:57:11stefanhoelzlsetmessageid: <>
2021-07-18 08:57:11stefanhoelzllinkissue44666 messages
2021-07-18 08:57:11stefanhoelzlcreate