1.BaseExeception 所有异常的基类

2.SystemEixt 解释器请求退出

3.KeyboardInterrupt 用户中断执行

4.Exception 常规错误的基类

5.StopIteration 迭代器没有更多的值

6.ArithmeticError 所有数值计算错误的基类

7.FloatingPointError 浮点计算错误的基类

8.OverflowError 数值运算潮湿处最大限制

9.ZeroDivisionError除零错误

10.AssertionError断言语句失败

11.AttributeError对象没有这个属性

12.EOFError没有内键输入,到达EOF 标记

13.IOError输入/输出操作失败

14.OSError 操作系统错误

15.ImportError导入模块失败

16.IndexError序列中没有此索引

17.KeyError映射中没有这个键

18.NameError为声明的变量名

19.SyntaxError语法错误

20.TanError Tab和空格混用

21.TypeError对类型无效的操作

22.ValueError传入无效的参数

python常见错误和异常的更多相关文章

  1. python 常见错误和异常 函数 正则表达式及多线程编程

    生成随机密码#!/usr/bin/env python import stringfrom random import choice def gen_pass(num=9): all_chs = st ...

  2. python的错误和异常

    python错误和异常 错误 错误分为语法错误和逻辑错误 语法错误 >>> if File "<stdin>", line 1 if ^ Syntax ...

  3. python之错误和异常

    错误 分为语法错误和逻辑错误,如下: 语法错误指示软件的结构上有错误,导致不能被解释器解释或编译器编译. 逻辑错误可能是由于不完整或是不合法的输入所致,或者是无法生成.计算.或是输出结果需要的过程无法 ...

  4. python常见错误总结

    TypeError: 'module' object is not callable 模块未正确导入,层级关系没找对 缩进错误. IndentationError: unindent does not ...

  5. python常见错误

    最近刚刚接触Python,为了养成好习惯,遇到了诸多的问题,林林总总,在这里简单记录下: 编写简单的python语句时: module level import not at top of file ...

  6. Python常见错误:IndexError: list index out of range

    用python写脚本查询字典时,在遍历字典时循环到某一项时老是报错   出现这种错误有两种情况: 第1种可能情况 list[index]index超出范围 第2种可能情况 list是空值就会出现 In ...

  7. 【python+selenium学习】Python常见错误之:IndentationError: unexpected indent

    初入python+selenium学习之路,总会遇到这样那样的问题.IndentationError: unexpected indent,这个坑我已经踏进数次了,索性记录下来.都知道Python对代 ...

  8. SyntaxError :invalid syntax Python常见错误

    1.忘记在 if , elif , else , for , while , class ,def 声明末尾添加 ":" 2.使用 = 而不是 ==,= 是赋值操作符而 == 是等 ...

  9. IndexError: list index out of range Python常见错误

    引用超过list最大索引,此错误非常常见,注意列表的元素个数 ----------------------------------------------

随机推荐

  1. C# opc 功能相关

    C# 程序里,使用 Interop.OPCAutomation.dll ,用于和opc通讯,读opc变量,写opc变量 链接: https://pan.baidu.com/s/1OpUa_Jct1gf ...

  2. vue watcher errors

    vue watcher errors Error in callback for watcher TypeError: Cannot set property of undefined" n ...

  3. 英语能力考试 All In One

    英语能力考试 All In One 托福,雅思,托业 TOEIC 托业考试 Test of English for International Communication (TOEIC) 国际交流英语 ...

  4. CustomEvent & Event

    CustomEvent & Event js 自定义事件 const event = new CustomEvent(typeArg, customEventInit); // add an ...

  5. 如何用 js 实现一个 call 函数

    如何用 js 实现一个 call 函数 原理 实现方式 总结 refs https://developer.mozilla.org/en-US/docs/Web/JavaScript/Referenc ...

  6. position: absolute; not work

    position: absolute; not work https://stackoverflow.com/questions/11928294/css-position-absolute-with ...

  7. API 注解 & Java API annotation

    API 注解 & Java API annotation 注解 annotation

  8. Build your own React

    Build your own React https://pomb.us/build-your-own-react/ https://github.com/pomber/didact demo htt ...

  9. js & class & init

    js & class & init how to call class init method in js when create an instance 在初始化类实例的时候调用,类 ...

  10. Flutter: debounce 避免高频率事件

    原文 函数 import 'dart:async'; Function debounce(Function fn, [int t = 30]) { Timer _debounce; return () ...