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

String fields should return an error when given non-UTF-8 #650

dan-blanchard opened this Issue Jun 23, 2017 · 3 comments


None yet
3 participants

dan-blanchard commented Jun 23, 2017

Currently, if a user specifies a bytes value for a String field that is not UTF-8, marshmallow will raise a UnicodeDecodeError. A more sensible thing to expect from a validation library like marshmallow would be for it to return an error message about this not being a valid UTF-8 String.


This comment has been minimized.

cwisecarver commented Oct 23, 2017

@sloria Any thoughts on this? I can make a PR if it will help.


This comment has been minimized.


sloria commented Oct 23, 2017

@dan-blanchard @cwisecarver Sorry for the delayed response; this one fell through the cracks. Yes, I think the proposed behavior is correct. I would certainly review and merge a PR for this.


This comment has been minimized.


sloria commented Dec 2, 2017

This is fixed in 0.15.0.

@sloria sloria closed this Dec 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment