python趟坑记录
问题1:
AttributeError: partially initialized module ‘requests’ has no attribute ‘get’ (most likely due to a circular import)
出现原因:python中明文规定不能以python的关键词来命名文件。
所以,以后切记不能以类名,包名来命名。
解决办法 :修改文件名:将http.py修改为my_http.py即可
问题1:
AttributeError: partially initialized module ‘requests’ has no attribute ‘get’ (most likely due to a circular import)
出现原因:python中明文规定不能以python的关键词来命名文件。
所以,以后切记不能以类名,包名来命名。
解决办法 :修改文件名:将http.py修改为my_http.py即可