python报错记录
1.AttributeError: 'NoneType' object has no attribute 'group'
import re
s=r'<title>kobe<\title>'
ret = re.search('<\w+><\\w+>',s)
print(ret.group(0)) 属性错误: "NoneType"对象没有属性'group'
说明:search或者match返回回来的结果为'None',是空类型,所以在调用group的时候报错(说白了就是正则可能写的不对,没返回结果,就报错)
2.StopIteration
li = [1,2,3,4]
ss = li.__iter__()
while 1:
abc = ss.__next__()
print(abc) Traceback (most recent call last):
File "E://python汇总/123.py", line 84, in <module>
abc = ss.__next__()
StopIteration 生成器停止错误:是由于生成器里面没有数据能被迭代出来的时候,会报次错误,要在返回或者输出的地方做异常处理
3.error: command 'gcc' failed with exit status 1
由于没有正确安装Python开发环境导致
yum install python-devel
返回系列
python报错记录的更多相关文章
- Python报错总结丶自定义报错
Python报错总结: 常见异常 1,NameError: name 'a' is not defined:未定义函数名 2,IndentationError: uninden ...
- Python报错module 'scipy.misc' has no attribute 'xxx'
Python报错module 'scipy.misc' has no attribute 'imresize' 解决办法: 安装Pillow包,命令如下: pip install Pillow 然后重 ...
- selenium python 报错“ unable to find binary in default location”
selenium python 报错如下: raise exception_class(message, screen, stacktrace)selenium.common.exceptions.W ...
- 报错记录(xml抬头报错)
报错记录(xml抬头报错) Referenced file contains errors (http://www.springframework.org/schema/beans/spring-be ...
- IDEA 报错记录
IDEA 报错记录 Process finished with exit code 0 这种主要是配了默认的 Tomcat ,然后又配置了外部的 Tomcat.解决办法,注释掉默认的: <dep ...
- Spring Boot 报错记录
Spring Boot 报错记录 由于新建的项目没有配置数据库连接启动报错,可以通过取消自动数据源自动配置来解决 解决方案1: @SpringBootApplication(exclude = Dat ...
- 解决Python报错:local variable 'xxx' referenced before assignment(引)
解决Python报错:local variable 'xxx' referenced before assignment(引) 解决Python报错:local variable 'xxx' refe ...
- python 报错 wxPyDeprecationWarning: Using deprecated class PySimpleApp.
如题:python 报错 提示为 : wxPyDeprecationWarning: Using deprecated class PySimpleApp. 解决:将 wx.PySimpleApp() ...
- PyCharm 中文 字符 python 报错 的 完美 解决方案!
PyCharm 中文 字符 python 报错 的 完美 解决方案! #_*_ coding:utf-8_*_ https://www.python.org/dev/peps/pep-0263/ 到p ...
随机推荐
- ThinkPHP5配置redis缓存
thinkphp采用cache类提供缓存功能支持,采用驱动方式,在使用缓存之前需要进行初始化操作.支持的缓存类型包括file.memcache.wincache.sqlite.redis和xcache ...
- Linux awk学习
零.awk标准语法 [root@wohaoshuai1 bbb]# echo "abcd" |awk 'BEGIN{print "wohaoshuai"} /a ...
- leetcode刷题第一日<两数和问题>
开始就用到了c++的哈希表是真的恶心,首先学习一波基础知识 https://blog.csdn.net/u010025211/article/details/46653519 下面放下大佬的代码 cl ...
- 解决ubuntu下firefox无法在线播放音频和视频的问题
原因 Ubuntu 为了规避专利和版权问题,很多东西没有预装,比如音视频解码器AAC. 那么为什么明明 Ubuntu 上没有AAC解码器, Chrome 却可以正常播放呢,自然的想法是 Chrome ...
- XVIII Open Cup named after E.V. Pankratiev. Grand Prix of Khamovniki
A. Ability Draft 记忆化搜索. #include<stdio.h> #include<iostream> #include<string.h> #i ...
- MVC 程序在编译时提示 GAC与 Temporary ASP.NET Files目录内引用文件版本不一致
今天在调试Mvc程序时,提示GAC与Temporary ASP.NET Files目录内引用文件版本不一致. [A]System.Web.WebPages.Razor.Configuration.Ho ...
- Installation of CarbonData 1.1.0 with Spark 1.6.2
关键词:carbondata spark thrift 数据仓库 [Install thrift 0.9.3] 注意 要装thrift-java必须先装ant . 有人说要装boost,我在cento ...
- 常用 jq 正则 包含手机正则,邮箱正则。。。
常用 jq 正则规则 1.手机 /^1(3|4|5|7|8)\d{9}$/ 2.qq /^[1-9][0-9]{5,10}$/ 3.邮箱 /^\w+((-\w+)|(\.\w+))*\@[ ...
- QVM 实操记 - 18.12.28
视频回放地址:https://i.iamlj.com/mp4/QVM-IMC-12.27-1080P.mp4 目录 目录 常规开发部署流程 准备工作 开发准备 网站部署 操作步骤 重装系统 LANP环 ...
- SPARK-18560
##### Receiver data can not be dataSerialized properly. ``` // :: ERROR executor.Executor: Exception ...