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.

aiohttp parser breaks with more than one argument

See original GitHub issue

Nothing 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:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sloriacommented, May 17, 2017

Just FYI: The latest release (1.6.2) includes the fix for this.

1reaction
ariddellcommented, May 12, 2017

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)!

Read more comments on GitHub >

github_iconTop 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 >

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