marshmallow-code / flask-marshmallow

Flask + marshmallow for beautiful APIs
http://flask-marshmallow.readthedocs.io/
MIT License
875 stars 59 forks source link

TypeError: Schema.__init__() got an unexpected keyword argument 'include_data' #316

Open dempstert opened 5 months ago

dempstert commented 5 months ago

Can't create any schemas at all.

class Price(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(128), index=True)

class PriceSchema(ma.SQLAlchemyAutoSchema):
    class Meta:
        model = Price

This raises the following error:

TypeError: Schema.__init__() got an unexpected keyword argument 'include_data'

Have also tried with ma.SQLAlchemySchema.

Installed: flask version : 2.0.1
flask_marshmallow version : 0.14.0

sloria commented 5 months ago

It appears you're using marshmallow-jsonapi, from which the include_data option was removed. see https://github.com/marshmallow-code/marshmallow-jsonapi/blob/dev/CHANGELOG.rst#080-2016-06-20