Marshmallow: Help Wanted: AttributeError: 'list' object has no attribute 'data' on schema.dump(model).data in 3.0.0

Created on 21 Aug 2019  路  2Comments  路  Source: marshmallow-code/marshmallow

Deserializing a model in marshmallow 3.0.0 seems to have changed. I have been using v2.19.5 with schema.dump(model).data. However, this no longer works and the following error is now thrown:

AttributeError: 'list' object has no attribute 'data'

What is the alternative then?

question

Most helpful comment

Please read the upgrade to 3.0 section of the docs.

You don't need to access .data attribute, dump already returns the data.

All 2 comments

Please read the upgrade to 3.0 section of the docs.

You don't need to access .data attribute, dump already returns the data.

thanks @lafrech

Was this page helpful?
0 / 5 - 0 ratings

Related issues

j4k0bk picture j4k0bk  路  3Comments

ambye85 picture ambye85  路  4Comments

vke-code picture vke-code  路  4Comments

agatheblues picture agatheblues  路  3Comments

Ovyerus picture Ovyerus  路  3Comments