标签:manage type tcp after patch nload object cep __name__
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()
标签:manage type tcp after patch nload object cep __name__
原文地址:https://www.cnblogs.com/JcrLive/p/12459981.html