. Advertisement .
..3..
. Advertisement .
..4..
I get an error
Exception happened during processing of request from ('127.0.0.1', 57917)
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 650, in process_request_thread
self.finish_request(request, client_address)
File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 720, in __init__
self.handle()
File "/Users/ryan/.local/share/virtualenvs/portal-2PUjdB8V/lib/python3.7/site-packages/django/core/servers/basehttp.py", line 171, in handle
self.handle_one_request()
File "/Users/ryan/.local/share/virtualenvs/portal-2PUjdB8V/lib/python3.7/site-packages/django/core/servers/basehttp.py", line 179, in handle_one_request
self.raw_requestline = self.rfile.readline(65537)
File "/usr/local/Cellar/python/3.7.4/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
when trying to start to use app for my project. How to fix the connectionreseterror errno 54 connection reset by peer error? Please give me some advice.
The cause:
This error happens because the issue is trying to provide static files through development server with
debug settings to False
, but the static files only can be served by the development server when in settings filedebug
is set toTrue
.Solution: Below is the way I resolved my problem:
First, I used:
instead of
Then I restarted development server and it worked fine.
If the favicon’s format is.png, it will display the same behavior as.ico.
Contrary to what is being suggested on other sites, downgrading Python from v3.6 will not fix the problem. Screenshot of error w.. png Favicon
This seems to be a Django problem. It will likely be fixed permanently in a future Django version.
Following https://bugs.python.org/issue27682#msg348302 I made the changes shown:
I then replaced BrokenPipeError with ConnectionAbortedError. This seems to have fixed the exception.
Update for Django 3 – I made the following changes to basehttp.py (rev.1.2.1) in order to eliminate all broken pipe error messages