欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

报错(持续.....)

程序员文章站 2022-05-04 14:59:23
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()