django - 错误 : [Errno 32] Broken pipe django

标签 django broken-pipe

有时当我查看终端时,我看到以下错误,谁能告诉我它正在显示以及如何避免它?

Exception happened during processing of request from ('127.0.0.1', 39444)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 582, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/home/comp/Envs/proj/local/lib/python2.7/site-packages/django/core/servers/basehttp.py", line 150, in __init__
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "/usr/lib/python2.7/SocketServer.py", line 640, in __init__
    self.finish()
  File "/usr/lib/python2.7/SocketServer.py", line 693, in finish
    self.wfile.flush()
  File "/usr/lib/python2.7/socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe

最佳答案

由于以下两个原因,您会收到该错误。 由于其他原因,您也可能会看到相同的问题
1-你不见了/在您的网址末尾,您可以通过在您请求的网址末尾添加“/”来修复它
2-您提出一些请求,然后迅速停止它。就像调用一个 url 然后取消调用并调用另一个 url。检查您在哪里调用电话(JavaScript 或后端),并确保您在不取消它的情况下调用该 url。

关于django - 错误 : [Errno 32] Broken pipe django,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20103858/

相关文章:

自定义模板中的 Django 500 消息

python - Django Python 中的搜索字段

python - Django Tastypie 高级过滤 : How to do complex lookups with Q objects

python - Django 开发将 HttpResponses 记录到开发服务器

c++ - 为什么在 try block 中初始化文件指针会导致管道损坏?

C++:从 pthread 调用 sendmail 导致 Broken Pipe

Django + WebKit = 破管道

python - 为什么我使用 Tag.models.all() 后 Taggit (Django-Tag) 就无法工作

python - 如何防止errno 32 断管?