AttributeError: 'NoneType' object has no attribute 'recovery'
2018-01-31 16:05
1256 查看
项目:Python + UIAutomator 安卓端自动化测试
问题:编译用例之后提示“AttributeError: 'NoneType' object has no attribute 'recovery'”
![](https://oscdn.geek-share.com/Uploads/Images/Content/202004/26/20d8e1d928a87abfd48b3688f6533b51)
原因分析:
1.打开报错代码行,查看是否对象没有属性
![](https://oscdn.geek-share.com/Uploads/Images/Content/202004/26/d5a13c544082d5fd8d3f998af72fe130)
进入对应函数发现并不像Error所说无属性
2.无奈之下只能一步步从初始化查起,发现是因为定义对象问题,少了标点符号!!!!
![](https://oscdn.geek-share.com/Uploads/Images/Content/202004/26/0b3f79ba0e5b8e228e9eded4475cc645)
在这里记录这个低级错误,找了大半天才发现了。
问题:编译用例之后提示“AttributeError: 'NoneType' object has no attribute 'recovery'”
原因分析:
1.打开报错代码行,查看是否对象没有属性
进入对应函数发现并不像Error所说无属性
2.无奈之下只能一步步从初始化查起,发现是因为定义对象问题,少了标点符号!!!!
在这里记录这个低级错误,找了大半天才发现了。
相关文章推荐
- 用python爬github上星级排名前列的项目报错AttributeError: 'NoneType' object has no attribute 'decode'
- pygal制图“AttributeError: 'NoneType' object has no attribute 'decode'”
- TensorBoard tf.summary.merge_all() AttributeError: 'NoneType' object has no attribute 'bucket 错误
- python图像处理问题AttributeError: 'NoneType' object has no attribute 'shape'
- Python报错之:AttributeError: 'NoneType' object has no attribute 'seq'
- python __def__ Exception AttributeError: "'NoneType' object has no attribute
- AttributeError: 'NoneType' object has no attribute 'sc' 解决方法!
- Flask-JWT 小坑:No JSON object could be decoded;AttributeError: 'NoneType' object has no attribute 'get
- Flask:报AttributeError: 'NoneType' object has no attribute 'metadata'错误
- Exception AttributeError: "'NoneType' object has no attribute
- Python: Attribute Error - 'NoneType' object has no attribute 'something'
- 跑faster rcnn测试时遇到错误Attribute Error: 'NoneType' object has no attribute 'astype'
- Sentry AttributeError: 'NoneType' object has no attribute 'connection_pool'
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- [小技巧] [trac] Fix AttributeError: 'NullTranslations' object has no attribute 'add'
- tensorflow :AttributeError: 'module' object has no attribute 'computation'
- 【python】AttributeError: 'module' object has no attribute 'HTTPSConnection'
- django view.py error 'QuerySet' object has no attribute 'save' 解决方法
- AttributeError: 'module' object has no attribute 'AF_INET'处理办法——python
- caffe输入层问题AttributeError: 'RoIDataLayer' object has no attribute 'param_str_'