import math

if __name__ == '__main__':
    name1 = raw_input("请输入您的编号:")
    print name1

完整的错误信息如下:

  File "D:\python\pythons\src\test.py", line 20
SyntaxError: Non-ASCII character '\xe8' in file D:\python\pythons\src\test.py on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

缺少编码类型声明:no encoding declared

修改如下:

#encoding:utf-8
import math

if __name__ == '__main__':
name1 = raw_input("请输入您的编号:")
print name1

 

相关文章:

  • 2022-12-23
  • 2021-10-15
  • 2022-12-23
  • 2021-09-25
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-04-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-25
  • 2021-12-11
  • 2021-08-19
相关资源
相似解决方案