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

Unhandled AttributeError when passing an integer into a delimited list field #149

psconnect-dev opened this issue Jan 30, 2017 · 0 comments


Copy link

commented Jan 30, 2017

Using use_args from webargs.flaskparser, there is an unhandled AttributeError when passing an integer into a delimited list field.

An example usage is:
@use_args("a": fields.DelimitedList(fields.Str())})

With data:
{"a": 1}

Please find below the stack trace:

Traceback (most recent call last):
File "...\webargs\", line 435, in wrapper
File "...\webargs\", line 357, in parse
result = self.load(parsed, schema)
File "...\webargs\", line 293, in load
return schema.load(data)
File "...\marshmallow\", line 568, in load
result, errors = self._do_load(data, many, partial=partial, postprocess=True)
File "...\marshmallow\", line 648, in _do_load
File "...\", line 295, in deserialize
index=(index if index_errors else None)
File "...\marshmallow\", line 68, in call_and_store
value = getter_func(data)
File "...\marshmallow\", line 288, in
File "...\marshmallow\", line 265, in deserialize
output = self._deserialize(value, attr, data)
File "...\webargs\", line 69, in _deserialize
else value.split(self.delimiter)
AttributeError: 'int' object has no attribute 'split'

Version 1.5.2 of webargs and 2.12.2 of marshmallow.

@sloria sloria closed this in 48b0dce Feb 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.