AttributeError: 'Response' object has no attribute 'json'
2014-05-04 22:24
921 查看
import了requests和json,但是在运行的时候报出“AttributeError: 'Response' object has no attribute 'json'”这样的错。后来在stackflow上看到类似的错误
http://stackoverflow.com/questions/22412873/attributeerror-response-object-has-no-attribute-json
原来是requests版本太旧的问题,先
print requests.__version__
0.10.6
不是最新版本的,于是update requests的版本,在CMD的命令行里输入以下命令
pip install --upgrade requests or easy_install requests
再运行就OK了。
http://stackoverflow.com/questions/22412873/attributeerror-response-object-has-no-attribute-json
原来是requests版本太旧的问题,先
print requests.__version__
0.10.6
不是最新版本的,于是update requests的版本,在CMD的命令行里输入以下命令
pip install --upgrade requests or easy_install requests
再运行就OK了。
相关文章推荐
- sqlalchemy enum AttributeError: 'list' object has no attribute 'replace'
- AttributeError: 'module' object has no attribute 'maketrans'
- unicode' object has no attribute 'read' json
- [python]Django AttributeError 'tuple' object has no attribute 'regex'
- TypeError: 'generator' object has no attribute '__getitem__'
- [Python][转]Exception AttributeError: "'NoneType' object has no attribute
- AttributeError: 'module' object has no attribute 'Frame' 解决方法
- solution:AttributeError: 'module' object has no attribute 'PY2'
- python遇到AttributeError: 'str' object has no attribute '_getAssertEqualityFunc'问题解决过程
- AttributeError: 'module' object has no attribute 'handlers'--Python子模块导入问题
- Debian (Jessie 8.0) 的修复pip AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'
- AttributeError: type object '_socketobject' has no attribute 'socket'
- AttributeError 'module' object has no attribute 'handlers'--Python子模块导入问题
- service_identity 模块 AttributeError: 'module' object has no attribute 'Any'
- 《python核心编程》序列:字符串、列表和元组Python: Attribute Error - 'NoneType' object has no attribute
- python __def__ Exception AttributeError: "'NoneType' object has no attribute
- openerp.cli.main() AttributeError: 'module' object has no attribute 'cli'
- Flask--AttributeError 'bool' object has no attribute '__call__'
- [Python]attributeError:'module' object has no attribute 'dump'
- Python:AttributeError: 'function' object has no attribute '_doc_'