python常见错误和异常
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常见错误和异常的更多相关文章
- python 常见错误和异常 函数 正则表达式及多线程编程
生成随机密码#!/usr/bin/env python import stringfrom random import choice def gen_pass(num=9): all_chs = st ...
- python的错误和异常
python错误和异常 错误 错误分为语法错误和逻辑错误 语法错误 >>> if File "<stdin>", line 1 if ^ Syntax ...
- python之错误和异常
错误 分为语法错误和逻辑错误,如下: 语法错误指示软件的结构上有错误,导致不能被解释器解释或编译器编译. 逻辑错误可能是由于不完整或是不合法的输入所致,或者是无法生成.计算.或是输出结果需要的过程无法 ...
- python常见错误总结
TypeError: 'module' object is not callable 模块未正确导入,层级关系没找对 缩进错误. IndentationError: unindent does not ...
- python常见错误
最近刚刚接触Python,为了养成好习惯,遇到了诸多的问题,林林总总,在这里简单记录下: 编写简单的python语句时: module level import not at top of file ...
- Python常见错误:IndexError: list index out of range
用python写脚本查询字典时,在遍历字典时循环到某一项时老是报错 出现这种错误有两种情况: 第1种可能情况 list[index]index超出范围 第2种可能情况 list是空值就会出现 In ...
- 【python+selenium学习】Python常见错误之:IndentationError: unexpected indent
初入python+selenium学习之路,总会遇到这样那样的问题.IndentationError: unexpected indent,这个坑我已经踏进数次了,索性记录下来.都知道Python对代 ...
- SyntaxError :invalid syntax Python常见错误
1.忘记在 if , elif , else , for , while , class ,def 声明末尾添加 ":" 2.使用 = 而不是 ==,= 是赋值操作符而 == 是等 ...
- IndexError: list index out of range Python常见错误
引用超过list最大索引,此错误非常常见,注意列表的元素个数 ----------------------------------------------
随机推荐
- codeforces 01B
B. Spreadsheets time limit per test 10 seconds memory limit per test 64 megabytes input standard inp ...
- 数仓增量更新hive实现
注:参考文末文章,加上自己的理解. 1.增量更新 有一个 base_table 表存放的是 12 月 15 日之前的所有数据,当 12 月 16 日的数据产生后,生成了一个 incremental_t ...
- Vue2.0 多种组件传值方法-不过如此的 Vuex
码文不易啊,转载请带上本文链接呀,感谢感谢 https://www.cnblogs.com/echoyya/p/14404397.html 在vue项目中了解组件间通讯很重要,也是最基础的面试题,可以 ...
- js map & Number
js map & Number const regionIds = `1,2,3`; // "1,2,3" regionIds.split(',').map(Number) ...
- Github App version released icons
# Github App version released icons http://shields.io/ Build Travis: https://img.shields.io/travis/U ...
- after upgrade macOS Catalina bugs
after upgrade macOS Catalina bugs 升级了macOS catalina后,碰到的 bugs? macOS 10.15.5 https://www.apple.com/m ...
- js 实现各种数据结构 APP
js 实现各种数据结构 APP 常见数据结构: 数组,队列,栈,堆,链表,集合,字典,散列表,树, 图 Array, Queue, Link, Collection, Set,Map, HashMap ...
- js to svg flowchart
js to svg flowchart flowchart https://flowchart.js.org/ https://github.com/adrai/flowchart.js https: ...
- trao 模拟点击 & js auto click
trao 模拟点击 & js auto click 日历上选择某一天,在 scrollview 自动定位到选择的那一天 click 后获取 item 的 e.target.offsetLeft ...
- modal 遮罩层,滚动穿透 bug
modal 遮罩层,滚动 穿透bug float 弹层 taro 小程序弹框 滚动击穿 问题 https://segmentfault.com/q/1010000011134345 solution ...