MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors 調整一下導入順序 import gevent from gevent import monkey monkey ...
MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors
調整一下導入順序
import gevent
from gevent import monkey
monkey.patch_all()
import requests
TypeError: '_SessionRequestContextManager' object is not iterable
Task exception was never retrieved
future: <Task finished coro=<download_one() done, defined at /home/zhf/py_prj/function_test/asy_try.py:51> exception=TypeError("'_SessionRequestContextManager' object is not iterable",)>
推薦使用aiohttp.ClientSession().get進行下載。這個函數能保證相關的TCP資源能夠得到釋放
concurrent.futures.process.BrokenProcessPool: A process in the process pool.......
添加main函數
if __name__ == '__main__':
main()