Whenever I start up my Django server i get the errors shown below. The weird thing is that sometimes the [WinError 10053] doesn't show up and I can develop normally but when it does show up the project seems to malfunction and .css and .js files also don't get loaded.
I have already looked into other stackoverflow questions that seemed related such as setting the correct code page to use with postgres or the python bug mentioned here https://bugs.python.org/issue27682. But I'm using python 3.9 so that bug should be fixed.
Does anyone know how to fix this? The project works just fine on the computers of some other people and everything that we compared seemed the same (settings, pycharm configuration,...).
Exception occurred during processing of request from ('127.0.0.1', 59986)
----------------------------------------
Exception occurred during processing of request from ('127.0.0.1', 55047)
Traceback (most recent call last):
File "D:\DataDownloads\lib\socketserver.py", line 683, in process_request_thread
self.finish_request(request, client_address)
Traceback (most recent call last):
File "D:\DataDownloads\lib\socketserver.py", line 683, in process_request_thread
self.finish_request(request, client_address)
File "D:\DataDownloads\lib\socketserver.py", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "D:\DataDownloads\lib\socketserver.py", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "D:\DataDownloads\lib\socketserver.py", line 747, in __init__
self.handle()
File "D:\Documents - data drive\StepDB\gitlab\site\Site\venv\lib\site-packages\django\core\servers\basehttp.py", line 171, in handle
self.handle_one_request()
File "D:\Documents - data drive\StepDB\gitlab\site\Site\venv\lib\site-packages\django\core\servers\basehttp.py", line 179, in handle_one_request
self.raw_requestline = self.rfile.readline(65537)
File "D:\DataDownloads\lib\socket.py", line 704, in readinto
return self._sock.recv_into(b)
ConnectionAbortedError: [WinError 10053] De software op uw hostcomputer heeft een verbinding verbroken
File "D:\DataDownloads\lib\socketserver.py", line 747, in __init__
self.handle()
File "D:\Documents - data drive\StepDB\gitlab\site\Site\venv\lib\site-packages\django\core\servers\basehttp.py", line 171, in handle
self.handle_one_request()
File "D:\Documents - data drive\StepDB\gitlab\site\Site\venv\lib\site-packages\django\core\servers\basehttp.py", line 179, in handle_one_request
self.raw_requestline = self.rfile.readline(65537)
----------------------------------------
File "D:\DataDownloads\lib\socket.py", line 704, in readinto
return self._sock.recv_into(b)
ConnectionAbortedError: [WinError 10053] De software op uw hostcomputer heeft een verbinding verbroken
----------------------------------------
----------------------------------------
Exception occurred during processing of request from ('127.0.0.1', 64741)
Traceback (most recent call last):
File "D:\DataDownloads\lib\socketserver.py", line 683, in process_request_thread
self.finish_request(request, client_address)
File "D:\DataDownloads\lib\socketserver.py", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "D:\DataDownloads\lib\socketserver.py", line 747, in __init__
self.handle()
File "D:\Documents - data drive\StepDB\gitlab\site\Site\venv\lib\site-packages\django\core\servers\basehttp.py", line 171, in handle
self.handle_one_request()
File "D:\Documents - data drive\StepDB\gitlab\site\Site\venv\lib\site-packages\django\core\servers\basehttp.py", line 179, in handle_one_request
self.raw_requestline = self.rfile.readline(65537)
File "D:\DataDownloads\lib\socket.py", line 704, in readinto
return self._sock.recv_into(b)
ConnectionAbortedError: [WinError 10053] De software op uw hostcomputer heeft een verbinding verbroken
----------------------------------------
----------------------------------------
Exception occurred during processing of request from ('127.0.0.1', 59454)
Traceback (most recent call last):
File "D:\DataDownloads\lib\socketserver.py", line 683, in process_request_thread
self.finish_request(request, client_address)
File "D:\DataDownloads\lib\socketserver.py", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "D:\DataDownloads\lib\socketserver.py", line 747, in __init__
self.handle()
File "D:\Documents - data drive\StepDB\gitlab\site\Site\venv\lib\site-packages\django\core\servers\basehttp.py", line 171, in handle
self.handle_one_request()
File "D:\Documents - data drive\StepDB\gitlab\site\Site\venv\lib\site-packages\django\core\servers\basehttp.py", line 179, in handle_one_request
self.raw_requestline = self.rfile.readline(65537)
File "D:\DataDownloads\lib\socket.py", line 704, in readinto
return self._sock.recv_into(b)
ConnectionAbortedError: [WinError 10053] De software op uw hostcomputer heeft een verbinding verbroken
--------------------------------------
Related
I am now trying to debug this error in django for ages. Is someone able to help me? The reason for this error is that I am doing a successful ajax call, however, then at the end the error is thrown. Please see:
Exception happened during processing of request from ('127.0.0.1', 59734)
Traceback (most recent call last):
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/socketserver.py", line 650, in process_request_thread
self.finish_request(request, client_address)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/socketserver.py", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/socketserver.py", line 720, in __init__
self.handle()
File "4_Code/Floq_Django/venv/lib/python3.8/site-packages/django/core/servers/basehttp.py", line 174, in handle
self.handle_one_request()
File "Floq_Django/venv/lib/python3.8/site-packages/django/core/servers/basehttp.py", line 182, in handle_one_request
self.raw_requestline = self.rfile.readline(65537)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [Errno 54] Connection reset by peer
Thank you so much.
I am completely new to Django/python so excuse any wrong vocabulary.
I have a Django based application that has been running perfectly on the HTTP protocol in an Ubuntu server. (Django is used both as App server and webserver here) I was asked to migrate the application from HTTP to the HTTPS protocol.
I have performed the below steps in the server.
Installed the following packages:
django-extensions, django-secure, and django-sslserver
Added 'sslserver' in setting.py under INSTALLED_APPS
Placed certificate and key in /etc/ssl/certs/ and /etc/ssl/private respectively
Start-up application with the command:
python3 manage.py runsslserver --certificate /etc/ssl/certs/my.cer --key /etc/ssl/private/my.key 172.31.83.127:8081 --configuration=uat
I have updated the CLB as below: -
[CLB Listener][1]
[CLB Health Check][2]
Now, when I run the command in the server I am getting below errors: -
File "/usr/lib/python3.5/wsgiref/handlers.py", line 138, in run
self.finish_response()
File "/usr/lib/python3.5/wsgiref/handlers.py", line 180, in finish_response
self.write(data)
File "/usr/lib/python3.5/wsgiref/handlers.py", line 279, in write
self._write(data)
File "/usr/lib/python3.5/wsgiref/handlers.py", line 453, in _write
result = self.stdout.write(data)
File "/usr/lib/python3.5/socket.py", line 593, in write
return self._sock.send(b)
File "/usr/lib/python3.5/ssl.py", line 861, in send
return self._sslobj.write(data)
File "/usr/lib/python3.5/ssl.py", line 586, in write
return self._sslobj.write(data)
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1848)
[13/Jan/2020 17:54:54] "GET / HTTP/1.1" 500 59
Exception happened during processing of request from ('172.31.5.104', 33784)
Traceback (most recent call last):
File "/usr/lib/python3.5/wsgiref/handlers.py", line 138, in run
self.finish_response()
File "/usr/lib/python3.5/wsgiref/handlers.py", line 180, in finish_response
self.write(data)
File "/usr/lib/python3.5/wsgiref/handlers.py", line 279, in write
self._write(data)
File "/usr/lib/python3.5/wsgiref/handlers.py", line 453, in _write
result = self.stdout.write(data)
File "/usr/lib/python3.5/socket.py", line 593, in write
return self._sock.send(b)
File "/usr/lib/python3.5/ssl.py", line 861, in send
return self._sslobj.write(data)
File "/usr/lib/python3.5/ssl.py", line 586, in write
return self._sslobj.write(data)
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1848)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.5/wsgiref/handlers.py", line 141, in run
self.handle_error()
File "/usr/local/lib/python3.5/dist-packages/django/core/servers/basehttp.py", line 116, in handle_error
super().handle_error()
File "/usr/lib/python3.5/wsgiref/handlers.py", line 368, in handle_error
self.finish_response()
File "/usr/lib/python3.5/wsgiref/handlers.py", line 180, in finish_response
self.write(data)
File "/usr/lib/python3.5/wsgiref/handlers.py", line 274, in write
self.send_headers()
File "/usr/lib/python3.5/wsgiref/handlers.py", line 331, in send_headers
if not self.origin_server or self.client_is_modern():
File "/usr/lib/python3.5/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 "/usr/lib/python3.5/socketserver.py", line 625, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python3.5/socketserver.py", line 681, in init
self.handle()
File "/usr/local/lib/python3.5/dist-packages/django/core/servers/basehttp.py", line 169, in handle
self.handle_one_request()
File "/usr/local/lib/python3.5/dist-packages/django/core/servers/basehttp.py", line 194, in handle_one_request
handler.run(self.server.get_app())
File "/usr/lib/python3.5/wsgiref/handlers.py", line 144, in run
self.close()
File "/usr/local/lib/python3.5/dist-packages/django/core/servers/basehttp.py", line 111, in close
super().close()
File "/usr/lib/python3.5/wsgiref/simple_server.py", line 36, in close
self.status.split(' ',1)[0], self.bytes_sent
AttributeError: 'NoneType' object has no attribute 'split'
Any help here would be really appreciated.
Thanks
For some reason Firefox, and only Firefox is causing this problem. Django server is still functional and I'm able to navigate, but stack trace keeps appearing on terminal.
Steps to reproduce problem:
Start django app (python3 manage.py runserver),
Open client/browser(firefox) and go to localhost:8000,
Start making requests / clicking URLs / anything that sends a request to Django
Terminal stack trace:
Exception happened during processing of request from ('127.0.0.1', 55364)
Exception happened during processing of request from ('127.0.0.1', 55366)
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 650, in process_request_thread
self.finish_request(request, client_address)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 720, in __init__
self.handle()
File "/Users/orion/Desktop/Claymore/lib/python3.7/site-packages/django/core/servers/basehttp.py", line 171, in handle
self.handle_one_request()
File "/Users/orion/Desktop/Claymore/lib/python3.7/site-packages/django/core/servers/basehttp.py", line 179, in handle_one_request
self.raw_requestline = self.rfile.readline(65537)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socket.py", line 589, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [Errno 54] Connection reset by peer
----------------------------------------
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 650, in process_request_thread
self.finish_request(request, client_address)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 720, in __init__
self.handle()
File "/Users/orion/Desktop/Claymore/lib/python3.7/site-packages/django/core/servers/basehttp.py", line 171, in handle
self.handle_one_request()
File "/Users/orion/Desktop/Claymore/lib/python3.7/site-packages/django/core/servers/basehttp.py", line 179, in handle_one_request
self.raw_requestline = self.rfile.readline(65537)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socket.py", line 589, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [Errno 54] Connection reset by peer
----------------------------------------
For some reason Chrome and Safari do not trigger the socket / connection reset. Not sure what is happening here.
I'm running Django 2.17 and I get many many errors from the dev server, the terminal prints this error 5 or six times on every requestx to the dev server.
Trying to add --verbosity 0 to the runserver command does not supress them.
I want to print from functions in views, but I don't need the errors from django.
Someone on the django IRC channel told me that they were normal... but it looks as if something is not configured correctly to me.
EDITED IN:
Traceback (most recent call last):
File "c:\python\Lib\wsgiref\handlers.py", line 138, in run
self.finish_response()
File "c:\python\Lib\wsgiref\handlers.py", line 180, in finish_response
self.write(data)
File "c:\python\Lib\wsgiref\handlers.py", line 274, in write
self.send_headers()
File "c:\python\Lib\wsgiref\handlers.py", line 332, in send_headers
self.send_preamble()
File "c:\python\Lib\wsgiref\handlers.py", line 255, in send_preamble
('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
File "c:\python\Lib\wsgiref\handlers.py", line 453, in _write
result = self.stdout.write(data)
File "c:\python\Lib\socketserver.py", line 796, 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):
Traceback (most recent call last):
File "c:\python\Lib\socketserver.py", line 647, in process_request_thread
self.finish_request(request, client_address)
File "c:\python\Lib\socketserver.py", line 647, in process_request_thread
self.finish_request(request, client_address)
File "c:\python\Lib\socketserver.py", line 357, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "c:\python\Lib\socketserver.py", line 357, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "c:\python\Lib\socketserver.py", line 717, in __init__
self.handle()
File "c:\python\Lib\socketserver.py", line 717, in __init__
self.handle()
File "C:\Python\virtualenvs\tools\lib\site-packages\django\core\servers\basehttp.py", line 151, in handle
self.handle_one_request()
File "C:\Python\virtualenvs\tools\lib\site-packages\django\core\servers\basehttp.py", line 153, in handle
self.handle_one_request()
File "C:\Python\virtualenvs\tools\lib\site-packages\django\core\servers\basehttp.py", line 176, in handle_one_request
handler.run(self.server.get_app())
File "C:\Python\virtualenvs\tools\lib\site-packages\django\core\servers\basehttp.py", line 176, in handle_one_request
handler.run(self.server.get_app())
File "c:\python\Lib\wsgiref\handlers.py", line 144, in run
self.close()
File "c:\python\Lib\wsgiref\handlers.py", line 144, in run
self.close()
File "c:\python\Lib\wsgiref\simple_server.py", line 35, in close
self.status.split(' ',1)[0], self.bytes_sent
File "c:\python\Lib\wsgiref\simple_server.py", line 35, in close
self.status.split(' ',1)[0], self.bytes_sent
AttributeError: 'NoneType' object has no attribute 'split'
AttributeError: 'NoneType' object has no attribute 'split'
--------------------------------------------------------------------------------
Looks like you are trying to split a variable that you expect to be str but which is somehow NoneType (None) instead.
I have a django app that is serving video files that were uploaded by a user and saved. The videos that are 1 second and 2 seconds work and embed just fine, but the videos that are 24-27 seconds don't render and produce the following errors:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py", line 86, in run
self.finish_response()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py", line 128, in finish_response
self.write(data)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py", line 217, in write
self._write(data)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 324, in write
self.flush()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
[10/Aug/2014 09:17:41] "GET /media/mbaron/video3.MOV HTTP/1.1" 500 59
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 49384)
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 593, in process_request_thread
self.finish_request(request, client_address)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/Library/Python/2.7/site-packages/django/core/servers/basehttp.py", line 139, in __init__
super(WSGIRequestHandler, self).__init__(*args, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 651, in __init__
self.finish()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 710, in finish
self.wfile.close()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 279, in close
self.flush()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
I'm rendering a video with the following code in my template:
<video controls="controls" width="800" height="600" name="Video Name" src="/media/{{ profile.video2 }}"></video>
Thanks for your help!