错误列表
NameError: name '……' is not defined
变量错误, …… 变量没有被定义
SyntaxError: invalid syntax
语法错误,代码书写规范问题
ModuleNotFoundError: No module named '……'
模块导入错误,没有这个名称的模块
TabError: inconsistent use of tabs and spaces in indentation
缩进错误,建议重写发生错误的代码
SyntaxError: EOL while scanning string literal
语法错误,字符串书写规范问题
ValueError: could not convert string to float:
值错误,不能将非数字的字符串转化为浮点数
ValueError: invalid literal for int() with base 10:
值错误,不能将非数字的字符串转化为整数
SyntaxError: Missing parentheses in call to 'print'
语法错误:调用“print”时缺少括号,python3.x都是print(),若有书上显示print ……那是老版本python2.x
AttributeError: module '……' has no attribute '……'
属性错误: 模块……中没有属性(函数or成员) ……
TypeError: …… missing n required positional argument:
类型错误: 函数……缺少n个所需参数