Django RunServer错误 [英] Django runserver error

查看:70
本文介绍了Django RunServer错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用开发服务器时,出现此错误:

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

中断了已建立的连接

我无法将其固定到任何单一来源。它似乎是随机发生的,afaik。这会导致我正在测试的页面加载非常长,并且页面加载正常。

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.

使用 Django 1.3 Beta 1

UPDATE :我现在正在使用Opera / Firefox进行测试,此后问题一直没有出现。恐怕要在Chrome中重试。

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.

推荐答案

我也遇到了同样的问题,并在django-users谷歌论坛上询问。没人知道怎么了。
似乎只有当我从浏览器刷新页面时才收到此消息,而不是单击页面内的链接时才得到。

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.

另外,请注意:我尝试使用python 2.6和2.7两种版本(从python.org网站开始)和ActiveState。同样的事情是随机发生的。

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:我是在稳定版本的Django上得到的。

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

这篇关于Django RunServer错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆