Django runserver error

匿名 (未验证) 提交于 2019-12-03 08:57:35

问题:

When using the development server, I get this error:

Validating models...  0 errors found Django version 1.3 beta 1, using settings 'book_scouts.settings' Development server is running at http://127.0.0.1:8000/ Quit the server with CTRL-BREAK. Traceback (most recent call last):   File "C:\Python26\lib\site-packages\django\core\servers\basehttp.py", line 283 , in run     self.finish_response()   File "C:\Python26\lib\site-packages\django\core\servers\basehttp.py", line 323 , in finish_response     self.write(data)   File "C:\Python26\lib\site-packages\django\core\servers\basehttp.py", line 402 , in write     self.send_headers()   File "C:\Python26\lib\site-packages\django\core\servers\basehttp.py", line 467 , in send_headers     self._write(str(self.headers))   File "C:\Python26\lib\socket.py", line 318, in write     self.flush()   File "C:\Python26\lib\socket.py", line 297, in flush     self._sock.sendall(buffer(data, write_offset, buffer_size)) error: [Errno 10053] An established connection was aborted by the software in yo ur host machine ---------------------------------------- Exception happened during processing of request from ('127.0.0.1', 2426) Traceback (most recent call last):   File "C:\Python26\lib\SocketServer.py", line 283, in _handle_request_noblock     self.process_request(request, client_address)   File "C:\Python26\lib\SocketServer.py", line 309, in process_request     self.finish_request(request, client_address)   File "C:\Python26\lib\SocketServer.py", line 322, in finish_request     self.RequestHandlerClass(request, client_address, self)   File "C:\Python26\lib\site-packages\django\core\servers\basehttp.py", line 569 , in __init__     BaseHTTPRequestHandler.__init__(self, *args, **kwargs)   File "C:\Python26\lib\SocketServer.py", line 618, in __init__     self.finish()   File "C:\Python26\lib\SocketServer.py", line 661, in finish     self.wfile.flush()   File "C:\Python26\lib\socket.py", line 297, in flush     self._sock.sendall(buffer(data, write_offset, buffer_size)) error: [Errno 10053] An established connection was aborted by the software in yo ur host machine 

I can't pin it down to any single source. It seems to happen randomly, afaik. It causes the page I'm testing to load up really long, and the page just loads fine.

Using Django 1.3 Beta 1

UPDATE: I'm using Opera/Firefox for testing now, and the problem hasn't come up since. I'm afraid to try again in Chrome.

回答1:

I got the same thing and asked on django-users google group. Nobody had any idea what's wrong. It seems only I get this when I refresh the page from browser and not when I click on links inside the page.

Also just as a heads up: I tried on Python 2.6 and 2.7 both stock version (form python.org website) and ActiveState one. Same thing happens randomly.

LE: I'm getting this on the stable version of Django.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!