Error 'NoneType' object has no attribute 'getall' in response processing in aiohttp in production application #7189
Replies: 3 comments 7 replies
-
Well, that attribute is set 2 lines earlier: Tracing back through the code, it appears that the headers are being returned at this point: aiohttp/aiohttp/http_parser.py Line 504 in ed04b4d And a few lines before the return there is a My only guess is that you could be using a subclass of one of those objects which returns a different value, or otherwise there is some dodgy code that is just setting the headers to Noting the |
Beta Was this translation helpful? Give feedback.
-
Hello!
With tracer enabled Abstract example
Tried various implementations of aiohttp client. P.S. When disable logging of function arguments and logging of function return values in the tracer settings, everything works |
Beta Was this translation helpful? Give feedback.
-
I have also just had this issue using version 3.8.5 and Python 3.11.4. I was stepping through in a debugger to solve another issue and when I fixed that, I hit this error. I seem to be able to reliably reproduce it. If I put a breakpoint on the line:
and then step over,
then I doubt anyone else can reproduce this, as it seems too strange to be true and I feel like I must be misunderstanding something, but if you can maybe this is a clue. |
Beta Was this translation helpful? Give feedback.
-
Hi team,
we are using aiohttp to call microservices in our organisation with the following spec
aiohttp version
3.8.1
python version 3.10.7
We started getting a large number of errors with the message
'NoneType' object has no attribute 'getall'
from 17th Jan 2023 (we got a few before that as well but starting 17th we saw significant increase in them). I am not able to figure out what may have caused the issue because there were no version bumps or new API calls that were added during this time.From the trace the line where the error originates is -
aiohttp/aiohttp/client_reqrep.py
Line 878 in 74340cb
The self.headers is None which is why the error.
Attaching the complete error trace trace.txt with truncated application code here.
Would appreciate any leads or pointers to the cause of the issue and suggestions for possible solves.
Beta Was this translation helpful? Give feedback.
All reactions