SyntaxError: Non-ASCII character ‘\xe5’ in file a.py on line 9, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

SyntaxError: Non-ASCII character ‘\xe5’ in file a.py on line 9, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

 

在文件头部加:

 

#-*-coding:utf-8-*-

Related Posts

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注