#30377: Exceptions when viewing project on local machine
-----------------------------------------+------------------------
               Reporter:  Chaos          |          Owner:  nobody
                   Type:  Bug            |         Status:  new
              Component:  HTTP handling  |        Version:  2.2
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 Hello,

 When running Django locally with the following command: "python -m django
 runserver" I receive 3 exceptions on every request I make to the
 webserver, on the browser nothing seems to work unusually. The page loads
 normally, but these exceptions are always printed. None of the tracebacks
 point to any of my code actually.

 My view is basic:

 {{{
 def homepage(request):
     return render(request, 'sites/home.html')
 }}}


 Exceptions:
 {{{
 Traceback (most recent call last):
   File "C:\Program Files (x86)\Python3.7\lib\wsgiref\handlers.py", line
 138, in run
     self.finish_response()
   File "C:\Program Files (x86)\Python3.7\lib\wsgiref\handlers.py", line
 180, in finish_response
     self.write(data)
   File "C:\Program Files (x86)\Python3.7\lib\wsgiref\handlers.py", line
 274, in write
     self.send_headers()
   File "C:\Program Files (x86)\Python3.7\lib\wsgiref\handlers.py", line
 332, in send_headers
     self.send_preamble()
   File "C:\Program Files (x86)\Python3.7\lib\wsgiref\handlers.py", line
 255, in send_preamble
     ('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
   File "C:\Program Files (x86)\Python3.7\lib\wsgiref\handlers.py", line
 453, in _write
     result = self.stdout.write(data)
   File "C:\Program Files (x86)\Python3.7\lib\socketserver.py", line 799,
 in write
     self._sock.sendall(b)
 ConnectionAbortedError: [WinError 10053] An established connection was
 aborted by the software in your host machine
 [16/Apr/2019 21:22:37] "GET /assets/favicon.ico HTTP/1.1" 500 59
 ----------------------------------------
 Exception happened during processing of request from ('127.0.0.1', 62675)
 Traceback (most recent call last):
   File "C:\Program Files (x86)\Python3.7\lib\wsgiref\handlers.py", line
 138, in run
     self.finish_response()
   File "C:\Program Files (x86)\Python3.7\lib\wsgiref\handlers.py", line
 180, in finish_response
     self.write(data)
   File "C:\Program Files (x86)\Python3.7\lib\wsgiref\handlers.py", line
 274, in write
     self.send_headers()
   File "C:\Program Files (x86)\Python3.7\lib\wsgiref\handlers.py", line
 332, in send_headers
     self.send_preamble()
   File "C:\Program Files (x86)\Python3.7\lib\wsgiref\handlers.py", line
 255, in send_preamble
     ('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
   File "C:\Program Files (x86)\Python3.7\lib\wsgiref\handlers.py", line
 453, in _write
     result = self.stdout.write(data)
   File "C:\Program Files (x86)\Python3.7\lib\socketserver.py", line 799,
 in write
     self._sock.sendall(b)
 ConnectionAbortedError: [WinError 10053] An established connection was
 aborted by the software in your host machine

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "C:\Program Files (x86)\Python3.7\lib\wsgiref\handlers.py", line
 141, in run
     self.handle_error()
   File "E:\Development\Python Environments\env\lib\site-
 packages\django\core\servers\basehttp.py", line 116, in handle_error
     super().handle_error()
   File "C:\Program Files (x86)\Python3.7\lib\wsgiref\handlers.py", line
 368, in handle_error
     self.finish_response()
   File "C:\Program Files (x86)\Python3.7\lib\wsgiref\handlers.py", line
 180, in finish_response
     self.write(data)
   File "C:\Program Files (x86)\Python3.7\lib\wsgiref\handlers.py", line
 274, in write
     self.send_headers()
   File "C:\Program Files (x86)\Python3.7\lib\wsgiref\handlers.py", line
 331, in send_headers
     if not self.origin_server or self.client_is_modern():
   File "C:\Program Files (x86)\Python3.7\lib\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 "C:\Program Files (x86)\Python3.7\lib\socketserver.py", line 650,
 in process_request_thread
     self.finish_request(request, client_address)
   File "C:\Program Files (x86)\Python3.7\lib\socketserver.py", line 360,
 in finish_request
     self.RequestHandlerClass(request, client_address, self)
   File "C:\Program Files (x86)\Python3.7\lib\socketserver.py", line 720,
 in __init__
     self.handle()
   File "E:\Development\Python Environments\env\lib\site-
 packages\django\core\servers\basehttp.py", line 171, in handle
     self.handle_one_request()
   File "E:\Development\Python Environments\env\lib\site-
 packages\django\core\servers\basehttp.py", line 194, in handle_one_request
     handler.run(self.server.get_app())
   File "C:\Program Files (x86)\Python3.7\lib\wsgiref\handlers.py", line
 144, in run
     self.close()
   File "E:\Development\Python Environments\env\lib\site-
 packages\django\core\servers\basehttp.py", line 111, in close
     super().close()
   File "C:\Program Files (x86)\Python3.7\lib\wsgiref\simple_server.py",
 line 35, in close
     self.status.split(' ',1)[0], self.bytes_sent
 AttributeError: 'NoneType' object has no attribute 'split'
 ----------------------------------------
 }}}

 Thank you!

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30377>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.4bf702b6abce51c62ae9e83946539727%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to