【Python】报错:AttributeError: module 'XXX' has no attribute 'get'

目录

一、报错情况

二、报错原因

三、解决方法



一、报错情况

AttributeError: module 'requests' has no attribute 'get'

属性错误:模块 “requests” 没有属性 “get”

【Python】报错:AttributeError: module 'XXX' has no attribute 'get'_第1张图片



二、报错原因

自命名文件名与 Python 原有库名(模块名)冲突了,也就是命名一样了。

【Python】报错:AttributeError: module 'XXX' has no attribute 'get'_第2张图片



三、解决方法

将文件名重命名即可。

你可能感兴趣的:(Python,从入门到自动化测试实战,Python,报错解决)