{TypeError}__init__() takes from 1 to 2 positional arguments but 3 were given

错误代码:

class RegistForm(Form):
    deposit = FloatField(validators=[InputRequired])

解决方法:

将InputRequired改为InputRequired()即可

正确代码:

class RegistForm(Form):
    deposit = FloatField(validators=[InputRequired()])

 

posted @ 2020-02-01 21:31  小呆丶  阅读(7871)  评论(0编辑  收藏  举报