在本地进行企业微信扫码登陆的开发时遇到这个问题,查网上大概只有规范代码和修改默认递归深度两种方法,修改递归深度本地再执行会直接程序停止,可能是栈溢出了。两种方法都没有效果。
def get_access_token():
headers = {"Content-Type": "application/json"}
get_token_url = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=" + CORPID + "&corpsecret=" + SECRET
r = requests.get(get_token_url, headers=headers) # 出错位置
同事给了个办法,有效,记录下防止遗忘
我的requests库是2.26.0,重新安装2.23.0解决问题。其他版本没有尝试,具体原因未知,求大佬解释
pip install requests==2.23.0



