报错:TypeError: __init__() takes from 1 to 2 positional arguments but 3 were given

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/weixin_44555296/article/details/100155300

报错页面图
代码修改的地方
db.session.query(func.count(Wish.id),Wish.isbn).filter(Wish.launched == False,
这段代码是修正后的代码,因为要统计心愿数量,所以:func.count(Wish.id)而下面这段代码:
db.session.query(func.count(Wish.id),Wish.isbn)意思是查询的主体是Wish模型里面的心愿数量和心愿isbn编号。

猜你喜欢

转载自blog.csdn.net/weixin_44555296/article/details/100155300
今日推荐