编程语言
首页 > 编程语言> > SyntaxError: Non-UTF-8 code starting with '\xcd' in file K:/PycharmProjects/code/tools/ge

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 --

标签:declared,code,xcd,encoding,python,SyntaxError
来源: https://www.cnblogs.com/Loveyinran/p/14291524.html