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()
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/178815.html
標籤:Python
上一篇:爬蟲報錯(持續.....)
