解决python报错信息RequestsDependencyWarning: urllib3 (1.26.11) or chardet (3.0.4) doesn‘t match a supporte
再次执行脚本, 报错信息没有了。
·
在调试测试脚本时遇到python报错信息:
λ python test.py
C:\Anaconda3\lib\site-packages\requests\__init__.py:91: RequestsDependencyWarning: urllib3 (1.26.11) or chardet (3.0.4) doesn't match a supported version!
RequestsDependencyWarning)
{'code': 401, 'msg': '请登录后操作', 'time': '1664098614', 'data': None}
Traceback (most recent call last):
File "test.py", line 66, in <module>
result = testobj.test_getuser()
File "test.py", line 58, in test_getuser
result = response['data']['mobile']
TypeError: 'NoneType' object is not subscriptable
解决方式:
命令1:
pip uninstall urllib3 chardet
命令2:
pip install --upgrade requests
再次执行脚本, 报错信息没有了。
更多推荐
已为社区贡献1条内容
所有评论(0)