Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dempstert opened this issue Jun 3, 2024 · 1 comment

Comments

@dempstert
Copy link

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
Copy link
Member

sloria commented Jun 3, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants