Jenkins集成git执行python的py文件报错如下:
Non-ASCII character ‘\xe8‘ in file in file test.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
解决方法:
在py文件的头行添加如下:
# -*- coding: utf-8 -*-
print("hello")
Jenkins集成git执行python的py文件报错如下:
Non-ASCII character ‘\xe8‘ in file in file test.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
解决方法:
在py文件的头行添加如下:
# -*- coding: utf-8 -*-
print("hello")