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

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

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

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

猜你喜欢

转载自www.cnblogs.com/wyhluckdog/p/10753027.html