We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am getting an error of "_deserialize() got an unexpected keyword argument 'partial'" when I attempt to deserialize with Marshmallow.
File "/Users/seanhoward/.virtualenvs/MegaTronWeb/lib/python3.9/site-packages/marshmallow/fields.py", line 365, in deserialize output = self._deserialize(value, attr, data, **kwargs) TypeError: _deserialize() got an unexpected keyword argument 'partial'
MA2 appears to require **kwargs be added to all custom serialize/deserialize functions.
see: (https://github.com/marshmallow-code/marshmallow/issues/1286)
I changed _serialize and _deserialize to include , **kwargs and it appears to be working.
, **kwargs
class ArrowField(fields.Field): """ An isoformatted datetime string. Arrow objects are converted to and from isoformatted strings by `Schema.dump` and `Schema.load` respectively. """ default_error_messages = { 'invalid_object': 'Invalid arrow object.', 'invalid_datetime': 'Unable to parse datetime.', } def _serialize(self, value, attr, obj, **kwargs): if value is None: return None return value.isoformat() def _deserialize(self, value, attr, data, **kwargs): if not value: raise self.fail('invalid_object') try: return arrow.get(value) except arrow.parser.ParserError: raise self.fail('invalid_datetime')
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am getting an error of "_deserialize() got an unexpected keyword argument 'partial'" when I attempt to deserialize with Marshmallow.
MA2 appears to require **kwargs be added to all custom serialize/deserialize functions.
see: (https://github.com/marshmallow-code/marshmallow/issues/1286)
I changed _serialize and _deserialize to include
, **kwargs
and it appears to be working.The text was updated successfully, but these errors were encountered: