gpt4 book ai didi

python - Django ConnectionAbortedError : [WinError 10053] An established connection was aborted by the software in your host machine

转载 作者:太空狗 更新时间:2023-10-29 21:58:07 25 4
gpt4 key购买 nike

我正在将 django 与 postgresql 一起使用,每当我尝试保存或删除任何内容时,都会发生此错误 -

Traceback (most recent call last):
File "c:\program files (x86)\python35-32\Lib\wsgiref\handlers.py", line 138, in run
self.finish_response()
File "c:\program files (x86)\python35-32\Lib\wsgiref\handlers.py", line 180, in finish_response
self.write(data)
File "c:\program files (x86)\python35-32\Lib\wsgiref\handlers.py", line 274, in write
self.send_headers()
Not Found: /favicon.ico
File "c:\program files (x86)\python35-32\Lib\wsgiref\handlers.py", line 332, in send_headers
self.send_preamble()
File "c:\program files (x86)\python35-32\Lib\wsgiref\handlers.py", line 255, in send_preamble
('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
[02/Aug/2016 18:30:14] "GET /favicon.ico HTTP/1.1" 404 2044
File "c:\program files (x86)\python35-32\Lib\wsgiref\handlers.py", line 453, in _write
self.stdout.write(data)
File "c:\program files (x86)\python35-32\Lib\socket.py", line 593, in write
return self._sock.send(b)
ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine
[02/Aug/2016 18:30:14] "GET /api/delete/ HTTP/1.1" 500 59
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 1712)
Traceback (most recent call last):
File "c:\program files (x86)\python35-32\Lib\wsgiref\handlers.py", line 138, in run
self.finish_response()
File "c:\program files (x86)\python35-32\Lib\wsgiref\handlers.py", line 180, in finish_response
self.write(data)
File "c:\program files (x86)\python35-32\Lib\wsgiref\handlers.py", line 274, in write
self.send_headers()
File "c:\program files (x86)\python35-32\Lib\wsgiref\handlers.py", line 332, in send_headers
self.send_preamble()
File "c:\program files (x86)\python35-32\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)\python35-32\Lib\wsgiref\handlers.py", line 453, in _write
self.stdout.write(data)
File "c:\program files (x86)\python35-32\Lib\socket.py", line 593, in write
return self._sock.send(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)\python35-32\Lib\wsgiref\handlers.py", line 141, in run
self.handle_error()
File "C:\Users\sushant\Desktop\projects\drfapi\venv\lib\site-packages\django\core\servers\basehttp.py", line 92, in handle_error
super(ServerHandler, self).handle_error()
File "c:\program files (x86)\python35-32\Lib\wsgiref\handlers.py", line 368, in handle_error
self.finish_response()
File "c:\program files (x86)\python35-32\Lib\wsgiref\handlers.py", line 180, in finish_response
self.write(data)
File "c:\program files (x86)\python35-32\Lib\wsgiref\handlers.py", line 274, in write
self.send_headers()
File "c:\program files (x86)\python35-32\Lib\wsgiref\handlers.py", line 331, in send_headers
if not self.origin_server or self.client_is_modern():
File "c:\program files (x86)\python35-32\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)\python35-32\Lib\socketserver.py", line 628, in process_request_thread
self.finish_request(request, client_address)
File "c:\program files (x86)\python35-32\Lib\socketserver.py", line 357, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\Users\sushant\Desktop\projects\drfapi\venv\lib\site-packages\django\core\servers\basehttp.py", line 99, in __init__
super(WSGIRequestHandler, self).__init__(*args, **kwargs)
File "c:\program files (x86)\python35-32\Lib\socketserver.py", line 684, in __init__
self.handle()
File "C:\Users\sushant\Desktop\projects\drfapi\venv\lib\site-packages\django\core\servers\basehttp.py", line 179, in handle
handler.run(self.server.get_app())
File "c:\program files (x86)\python35-32\Lib\wsgiref\handlers.py", line 144, in run
self.close()
File "c:\program files (x86)\python35-32\Lib\wsgiref\simple_server.py", line 35, in close
self.status.split(' ',1)[0], self.bytes_sent
AttributeError: 'NoneType' object has no attribute 'split'
----------------------------------------

发生的情况是,每当存在数据库保存\删除命令时,它都会执行两次,第一次没有错误,第二次抛出此错误,因此保存完成了两次。

据我了解,某些程序正在阻止它(如错误所述),因此我删除了我拥有的防病毒软件,但没有得出结论。

有人知道这是怎么回事吗?

编辑:这是一个 Python 错误,已报告 here

最佳答案

我已经在 Python 中 checkin 了一个修复程序:https://github.com/python/cpython/pull/9713

它将在下一版本的 Python 3.7 及更高版本中提供。

关于python - Django ConnectionAbortedError : [WinError 10053] An established connection was aborted by the software in your host machine,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38721428/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com