|
运行python 脚本出现如下报错:
File "gbandedges", line 91
SyntaxError: Non-ASCII character '\xe8' in file gbandedges on line 91, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
python的默认编码文件是用的ASCII码,将文件存成了UTF-8,编译就可以通过。或在在py文件开头(必须是第一行)加入
#coding=utf-8
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-12-22 01:10
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社