解决:AttributeError: module 'requests' has no attribute 'post'”

时间:2019-04-22 21:36:02   收藏:0   阅读:946

今天学习Requests库,当用pip install requests安装后,写了一段代码报错:AttributeError: module ‘requests‘ has no attribute ‘post‘”

技术分享图片

发现原来是文件名命名有问题:

技术分享图片

发现文件的命名与导入的库名一样了,所以会报错。将文件名更正一下就解决问题了。

原文:https://www.cnblogs.com/wyhluckdog/p/10753027.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!