Mongoengine: TypeError: __init__() got an unexpected keyword argument

后端 未结 4 1997
我在风中等你
我在风中等你 2020-12-19 20:43

I am using flask-mongoengine extension and I have a User class like this:

class User(db.Document, UserMixin):     
    email = db.StringField(max_length=120,         


        
4条回答
  •  时光说笑
    2020-12-19 21:12

    Try downgrading pymongo.

    pip install pymongo==2.8
    

    I was getting this error no matter what and the only way I fixed it was to downgrande pymongo from 3.0 to 2.8.

提交回复
热议问题