====================报错信息==========
File "D:\Python36\lib\ssl.py", line 465, in options super(SSLContext, SSLContext).options.__set__(self, value) [Previous line repeated 321 more times] RecursionError: maximum recursion depth exceeded while calling a Python object
==================多进程============
p = Pool(4)
res_list = []
for i in token_list:
res = p.apply_async(create_app_fun, args=(i,))
res_list.append(res)
p.close()
p.join()
======================被掉函数=========
def create_app_fun(token):
url = base_url + WebApi.create_app
data = {}
headers = {'token': token}
res = requests.post(url=url, json=data, headers=headers)
return taskno
解决办法:
import gevent #在requests调用之前先导入gevent
import requests