jenkins 运行python3,输出中文提示UnicodeEncodeError: ‘ascii‘ codec can‘t encode characters
jenkins
·
1、如果你直接运行python程序
可以 PYTHONIOENCODING=utf-8 python3 test.py
2、如果你是用nohup后台运行,可以在jenkins中写
BUILD_ID=dontKillMe #保持后台运行python程序
export PYTHONIOENCODING=utf-8 #解决中文输出问题
nohup python3 -u client.py > test.log 2>&1 &
sleep 10
更多推荐
所有评论(0)