-
-
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
Logging error #816
Comments
Showing Also might you provide |
I use the default in I added this code:
And I got this output when reproducing the problem (I indented for ease of reading):
|
Hi @asvetlov, does this help? I've tried looking at the code, but I'm having a hard time following. For all I can tell, this is the culprit:
It seems like However, I'm having a hard time explaining why this is the case. Any ideas? Thanks, André |
Hmm. Yes, looks like the only line that makes But it's called only on server finishing. Is it your case? I can easy add a workaround to don't log transport info if it is After quick review I see just dropping |
Yes, I usually get this error when I send CTRL-C/SIGINT. |
I also only get the the error if there are any pending connections. |
In case it helps, here is my setup/teardown sequence:
|
Just got the same error. Using aiohttp-wsgi to serve on a unix socket. Yeah, unix sockets don't have peer names, you should handle that. |
Fixed by #889 |
Thanks! |
I have found the same traceback with the last stable build (0.21.6).
I'm going to add more info as soon as I catch it again. |
Should be fixed in next aiohttp release |
I still have a similar issue with aiohttp-0.22.4. Traceback (most recent call last):
File "/home/feeds/.local/lib64/python3.5/site-packages/aiohttp/helpers.py", line 405, in log
[message, environ, response, transport, time]))
File "/home/feeds/.local/lib64/python3.5/site-packages/aiohttp/helpers.py", line 392, in _format_line
return tuple(m(args) for m in self._methods)
File "/home/feeds/.local/lib64/python3.5/site-packages/aiohttp/helpers.py", line 392, in <genexpr>
return tuple(m(args) for m in self._methods)
File "/home/feeds/.local/lib64/python3.5/site-packages/aiohttp/helpers.py", line 348, in _format_a
return args[3].get_extra_info('peername')[0] if args[3] is not None \
IndexError: index out of range |
print(args[3].get_extra_info('peername')) gives b'' |
I never tested it on unix sockets. |
Fixed by 8e8469b |
Andrew, thanks, but I do not really understand, what you are talking about, I don't use any format at all. I use aiohttp_wsgi, where a Unix socket lives. How could I trace the exact place where it happens? |
Ok, you've got default format string containing '%a'. |
I'm getting an error in the
aiohttp.access
logger related to an invalid log format.I'm using version 0.21.2 on Python 3.5.1 for Windows (x86 build).
The stack trace doesn't include any spec of the message, but from what I can make of it, the transport is
None
. I'm not sure why that would be the case for successful connections.I'm getting this using the WebSocket server from a browser on the same machine as the WebSocket server (haven't tried remote to see if it makes a difference).
Is there any additional info I can get you that will help fix this?
Thanks!
The text was updated successfully, but these errors were encountered: