question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: make() got an unexpected keyword argument 'many'

See original GitHub issue

I’m attempting to run your marshmallow_example.py example, but keep running into this error:

...
File "/Users/SomeProject/venv/lib/python3.7/site-packages/marshmallow/schema.py", line 835, in _do_load
    partial=partial,
  File "/Users/SomeProject/venv/lib/python3.7/site-packages/marshmallow/schema.py", line 1014, in _invoke_load_processors
    partial=partial,
  File "/Users/SomeProject/venv/lib/python3.7/site-packages/marshmallow/schema.py", line 1135, in _invoke_processors
    data = processor(data, many=many, **kwargs)
TypeError: make() got an unexpected keyword argument 'many'

I also had to update the get method to post in this block to get past the error: TypeError: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body.

@api.route("/restplus/make_a_widget")
    class WidgetResource(Resource):
        @accepts(
            "Doodad", dict(name="some_arg", type=str), schema=DoodadSchema, api=api
        )
        @responds("Widget", schema=WidgetSchema, api=api)
        def post(self):
            from flask import jsonify

            return request.parsed_obj

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
apryor6commented, Aug 23, 2019

Issue has been resolved.

The error was purely in the example code, and not the library itself, so no updated installation is required. Simply use this file

The bug was that the API for post_load has changed in marshmallow 3. The updated example uses this properly. I also simplified the example a bit to use dataclasses so there is less clutter. Let me know if there are other issues.

0reactions
Fail-Safecommented, Aug 23, 2019

Many thanks for looking into this. Being new to Marshmallow, myself, I did not think to check into the post_load syntax change. Now that the example is working for me, I’m going to dive deep into this.

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: __init__() got an unexpected keyword argument ...
While trying to return a query-set using generic views, I get an error. TypeError: init() got an unexpected keyword argument 'many'.
Read more >
exception got an unexpected keyword argument 'many' #7066
TypeError : Ingrediente() got an unexpected keyword argument 'many'. It looks like you've passed your serializer_class to your model class, ...
Read more >
init__() got an unexpected keyword argument 'max_iter'?
How to fix TypeError: __init__() got an unexpected keyword argument 'max_iter'?. # Create the model using sklearn (don't worry about the parameters for ......
Read more >
How to debug task "got an unexpected keyword argument"
I wondering if someone might have a bright idea how I can debug the following error, which get periodically in production. I've searched...
Read more >
typeerror: __init__() got an unexpected keyword ... - You.com
That being said, if you work with a ModelForm , Django can already do most of the work for you. Open side panel....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found