Karthikeyan Singaravelan <[email protected]> added the comment:
I think this is an issue with wsgiref handling client closure rather than a Windows/Django bug. I saw this sporadically but not consistently while running `make serve` to serve the docs which uses wsgiref simple server to serve docs on my Mac OS. Related issue34547 with a PR that catches ConnectionAbortedError and returns. PR link : https://github.com/python/cpython/pull/9713/ Sample traceback while serving docs locally with `make serve` on Mac OS: 127.0.0.1 - - [12/Oct/2018 10:56:57] "GET /_sources/library/asyncio-eventloop.rst.txt HTTP/1.1" 500 59 ---------------------------------------- Exception happened during processing of request from ('127.0.0.1', 50436) Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 138, in run self.finish_response() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 180, in finish_response self.write(data) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 274, in write self.send_headers() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 332, in send_headers self.send_preamble() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 255, in send_preamble ('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1') File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 453, in _write result = self.stdout.write(data) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 796, in write self._sock.sendall(b) BrokenPipeError: [Errno 32] Broken pipe During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 141, in run self.handle_error() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 368, in handle_error self.finish_response() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 180, in finish_response self.write(data) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 274, in write self.send_headers() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 331, in send_headers if not self.origin_server or self.client_is_modern(): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 344, in client_is_modern return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9' TypeError: 'NoneType' object is not subscriptable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 313, in _handle_request_noblock self.process_request(request, client_address) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 344, in process_request self.finish_request(request, client_address) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 357, in finish_request self.RequestHandlerClass(request, client_address, self) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 717, in __init__ self.handle() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/simple_server.py", line 133, in handle handler.run(self.server.get_app()) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 144, in run self.close() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/simple_server.py", line 35, in close self.status.split(' ',1)[0], self.bytes_sent AttributeError: 'NoneType' object has no attribute 'split' Thanks ---------- nosy: +xtreak _______________________________________ Python tracker <[email protected]> <https://bugs.python.org/issue27682> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
