no attribute 'get'
时间: 2023-10-02 12:03:49 浏览: 44
报错信息"AttributeError: module 'requests' has no attribute 'get'"意味着在使用requests模块时,尝试获取'get'属性但未成功。这个错误通常是因为你在使用requests模块时出现了问题。解决这个问题的方法如下所示:
1. 确保你已经正确安装了requests模块。你可以使用命令`pip install requests`来安装。
2. 检查你的代码中是否存在与requests模块同名的变量或函数。这可能会导致模块无法正常导入。如果有同名变量或函数,请将其更名。
3. 确保你的代码中正确导入了requests模块。可以使用`import requests`语句导入requests模块。
4. 如果你的代码中导入了requests模块的特定部分(例如`from requests import get`),请确保该属性在requests模块中存在。
5. 检查你的代码中是否存在拼写错误。请仔细检查是否正确使用了'get'属性。
综上所述,你可以通过检查模块安装、变量命名、模块导入和属性拼写等方面来解决"AttributeError: module 'requests' has no attribute 'get'"错误。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [【hacker的错误集】AttributeError:module ‘requests‘ has no attribute ‘get](https://blog.csdn.net/xqe777/article/details/123356700)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [AttributeError: module ‘requests‘ has no attribute ‘get](https://blog.csdn.net/zhanghm1995/article/details/122893823)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [【Python】AttributeError: ‘AutoSchema’ object has no attribute ‘get_link’](https://download.csdn.net/download/weixin_38534444/13745029)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)