-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
TypeError in data_received of client_proto #1770
Comments
this looks suspicious. could you post example code? seems server you are trying to connect to upgrade connection without checking incoming headers |
should be fixed in master |
I encoutered this issue again. This is not fixed in 2.0.5. Please repoen ! Probably a simple fix would be to do the following, but it seems pretty dirty :
The error happens randomly and I cannot reproduce it using a sample code. On the stack, I can see that everytime its the C parser which is being used. It probably comes from the C parser, which returns None sometimes instead of empty bytes : Here is a screenshot of the HTTP Operation provoking the error, directly from the stack : |
could you try 2.0 branch |
I let my software run actively this morning and didn't encoutered any error despite forcing it to send many requests. Looks all good ! |
ok, I will release new version later today |
Long story short
I migrated from aiohttp 1.0 to aiohttp 2.0. It seems to work correctly but it looks unstable.
Expected behaviour
No critical error.
Actual behaviour
I got a critical error in data received :
Steps to reproduce
I'm not sure what is the cause of this bug, but by analyzing the code I found some weird incoherencies. Here I found the lines
Where
self._tail
is set toNone
before callingself.data_received
.https://github.com/aio-libs/aiohttp/blob/master/aiohttp/client_proto.py#L125
And here, it seems more correct, with
self._tail
being set to empty bytes.https://github.com/aio-libs/aiohttp/blob/master/aiohttp/client_proto.py#L141
Here are some things I found in the stack. The parser is
HttpResponseParserC
. TheHttpParserC
returns None instead of empty bytes sometimes : https://github.com/aio-libs/aiohttp/blob/master/aiohttp/_http_parser.pyx#L285Your environment
Python 3.5.2, aiohttp latest version (2.0.4).
The text was updated successfully, but these errors were encountered: