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

Latest version breaks something in the h11 implementation #1533

Closed
Wouterkoorn opened this issue Jun 23, 2022 · 2 comments · Fixed by #1534
Closed

Latest version breaks something in the h11 implementation #1533

Wouterkoorn opened this issue Jun 23, 2022 · 2 comments · Fixed by #1534

Comments

@Wouterkoorn
Copy link

I'm using uvicorn to run a FastAPI application. I just download the latest uvicorn version 0.18.0 and got the following error when trying to run my app:

Fatal error: protocol.data_received() call failed.
protocol: <uvicorn.protocols.http.h11_impl.H11Protocol object at 0x7fcbc87089a0>
transport: <_SelectorSocketTransport fd=11 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
  File "/.../python3.9/asyncio/selector_events.py", line 870, in _read_ready__data_received
    self._protocol.data_received(data)
  File "/.../venv/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 161, in data_received
    self.handle_events()
  File "/.../venv/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 166, in handle_events
    event = self.conn.next_event()
  File "/.../venv/lib/python3.9/site-packages/h11/_connection.py", line 471, in next_event
    if len(self._receive_buffer) > self._max_incomplete_event_size:
TypeError: '>' not supported between instances of 'int' and 'NoneType'

(I removed the full paths)

When going back to version 0.17.0, I don't encounter this error...

Please let me know if there is more details I can share.

@Kludex
Copy link
Sponsor Member

Kludex commented Jun 23, 2022

Thanks for reporting it that fast. :)

Would you mind checking if #1534 solves your issue?

EDIT: Tested here already, works fine with the PR. 👍

@Wouterkoorn
Copy link
Author

Yes, that fixed it for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants