aiohttp parser breaks with more than one argument
See original GitHub issueNothing seems to work once I add more than one field. Here’s my minimal example.
I’m validating with:
programs_actions_args = {
'type': webargs.fields.Str(required=True),
'chain': webargs.fields.Integer(required=True),
}
and here’s what happens when I POST:
POST /v1/programs/8137474d19926b0aa8efd4f1d3944131d59269d97a7bd8dab8e79d667eb314df/actions HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 34
Content-Type: application/json
Host: localhost:8080
User-Agent: HTTPie/0.9.9
{
"chain": "3",
"type": "sampling"
}
HTTP/1.1 422 Unprocessable Entity
Content-Length: 46
Content-Type: application/json
Date: Fri, 05 May 2017 21:20:42 GMT
Server: Python/3.6 aiohttp/2.0.7
{
"type": [
"Missing data for required field."
]
}
Things work fine if there’s only one argument.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Client Reference — aiohttp 3.8.3 documentation
Client session is the recommended interface for making HTTP requests. Session encapsulates a connection pool (connector instance) and supports keepalives by ...
Read more >How to fix BeautifulSoup breaking asynchronous execution of ...
Any idea why? Because asyncio is single-threaded. If BeautifulSoup parsing takes a lot of CPU, that time cannot be used to service HTTP...
Read more >Making 1 million requests with python-aiohttp
Async programming is not easy. It's not easy because using callbacks and thinking in terms of events and event handlers requires more effort ......
Read more >4. 20 Asyncio Libraries You Aren't Using (But…Oh, Never Mind)
Maintains persistent socket connections to multiple clients ... async def main ( * args , * * kwargs ) : server = await...
Read more >What's New In Python 3.11 — Python 3.11.1 documentation
PEP 680: tomllib — Support for parsing TOML in the Standard Library ... Traceback (most recent call last): File "query.py", line 37, in...
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 FreeTop 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
Top GitHub Comments
Just FYI: The latest release (1.6.2) includes the fix for this.
I wish I knew more about marshmallow and aiohttp internals. I’ll probably take a stab at it eventually. Thanks for webargs (and everything else)!