TypeError: make() got an unexpected keyword argument 'many'
See original GitHub issueI’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:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.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!