AttributeError: module 'requests' has no attribute 'get'错误解析

AttributeError: module 'requests' has no attribute 'get'错误解析

报错原因:文件名和模块名冲突

如图所示,看了很久没有发现代码有啥问题,但是就是报错,经排查是因为文件名是requests.py,和import模块导入requests冲突了,系统会认为我们导入的是当前的requests,py,所以产生报错