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

Using 'use_kwargs' with a callable #103

ksesong opened this issue Apr 13, 2016 · 1 comment


Copy link

commented Apr 13, 2016

When we use the use_kwargs method with a callable (that accepts a request and returns a Schema instance), like in this example with use_kwargs: an error raises here, as the argmap is now a callable, not a dict.

argmap = <function factory at 0x1090227d0>

    def get_field_names_for_argmap(argmap):
        if isinstance(argmap, ma.Schema):
            all_field_names = set([fname for fname, fobj in iteritems(argmap.fields)
                if not fobj.dump_only])
>           all_field_names = set(argmap.keys())
E           AttributeError: 'function' object has no attribute 'keys'

get_field_names_for_argmap is called by fill_in_missing_args.

@sloria sloria closed this in a777112 Apr 14, 2016

@sloria sloria added the bug label Apr 14, 2016


This comment has been minimized.

Copy link

commented Apr 14, 2016

Thanks for reporting. I've released a hotfix for this.

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