SyntaxError: Non-ASCII character '\xe7' in file /, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
python 不支持中文引起的
在文件头加上# -*- coding: UTF-8 -*-
本文介绍了解决Python中因使用中文字符导致的SyntaxError问题的方法。通过在文件头部添加指定的编码声明来确保程序能够正确解析非ASCII字符。
SyntaxError: Non-ASCII character '\xe7' in file /, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
python 不支持中文引起的
在文件头加上# -*- coding: UTF-8 -*-
6325
2911
1322
479
385
1871

被折叠的 条评论
为什么被折叠?