我在用烧瓶和壁炉。我的功能是:
@app.route('/index',methods=['POST'])
def index():
....
....
gevent.joinall(threads)
res = [t.value for t in threads]
return jsonify(**res)
生成的响应(res)是一个字典列表,如下所示:
[{u'token': u'146bf00b2cb96e6c425c2ab997637', u'a': u'aaa'},{u'token': u'146bf00b2cb96e6c425c2ab3f7417', u'a': u'bbb'}, {u'token': u'146bf00b2cb96e6c425c2ab3f5692', u'a': u'ccc'} ]
当我试着解决这个问题时,我得到:
TypeError: jsonify() argument after ** must be a mapping, not list
我做错什么了?
目前没有回答
相关问题 更多 >
编程相关推荐