SyntaxError: Non-UTF-8 code starting with '\xcd' in file K:/PycharmProjects/code/tools/ge

python代码中或者注释中存在中文字符出现SyntaxError: Non-UTF-8 code starting with '\xcd' in file K:/PycharmProjects/code/tools/getExcelData.py on line

6, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details这个问题时,可以尝试在代码第一行添加:

-- coding: utf-8 --

上一篇:SyntaxError: Non-UTF-8 code starting with '\xbb' in file D:\流畅学python\ex32.py on line 1


下一篇:[BZOJ]4644: 经典傻逼题