blog.csdn.net/A156348933/…
MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. It may also silently lead to incorrect behaviour on Python 3.7. Please monkey-patch earlier. See https://github.com/gevent/gevent/issues/1016. Modules that had direct imports (NOT patched): ['urllib3.util.ssl_ (D:\\MyCode\\yiqiubook\\YiQiuBook\\env\\lib\\site-packages\\urllib3\\util\\ssl_.py)', 'urllib3.util (D:\\MyCode\\yiqiubook\\YiQiuBook\\env\\lib\\site-packages\\urllib3\\util\\__init__.py)'].
curious_george.patch_all(thread=False, select=False)
1
2
解决办法,在项目启动的第一个文件第一行写上import grequests,先导入,然后后续其他文件需要使用的时候就不会报错了。
错误二
使用调试服务器(即app.run()启动)时报错
greenlet.error: cannot switch to a different thread
1
解决办法添加参数threaded=False
app.run(host='0.0.0.0',port=80, threaded=False)
————————————————
版权声明:本文为CSDN博主「风轻云断」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/A156348933/article/details/86487130