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

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

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

相关文章:

  • 2021-12-16
  • 2021-11-25
  • 2021-05-25
  • 2021-05-19
  • 2021-09-15
  • 2021-12-19
  • 2021-11-02
  • 2021-11-28
猜你喜欢
  • 2021-05-07
  • 2021-04-20
  • 2021-04-01
  • 2021-12-06
  • 2021-08-09
  • 2022-01-07
  • 2021-09-02
相关资源
相似解决方案