Skip to content

cicd#

Azure pipeline Windows agent UnicodeEncodeError

For people who encounter UnicodeEncodeError when using Windows Azure Pipeline agent, the issue might be here.

As per above link, or this email, the solutions could be:

  • You can override just sys.std* to UTF-8 by setting the environment variable PYTHONIOENCODING=UTF-8.
  • You can override all I/O to use UTF-8 by setting PYTHONUTF8=1, or by passing the command-line option -X utf8.