Python Django开发服务器关闭错误

Python Django开发服务器关闭错误,python,django,Python,Django,每当我用CTRL+c关闭我的开发服务器(./manage.py runserver)时,我都会收到以下消息: [24/Feb/2009 22:05:23] "GET /home/ HTTP/1.1" 200 1571 [24/Feb/2009 22:05:24] "GET /contact HTTP/1.1" 301 0 [24/Feb/2009 22:05:24] "GET /contact/ HTTP/1.1" 200 2377 ^C Error in atexit._run_exitfun

每当我用CTRL+c关闭我的开发服务器(./manage.py runserver)时,我都会收到以下消息:

[24/Feb/2009 22:05:23] "GET /home/ HTTP/1.1" 200 1571
[24/Feb/2009 22:05:24] "GET /contact HTTP/1.1" 301 0
[24/Feb/2009 22:05:24] "GET /contact/ HTTP/1.1" 200 2377
^C
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/logging/__init__.py", line 1354, in shutdown
    h.flush()
TypeError: flush() takes exactly 2 arguments (1 given)
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/logging/__init__.py", line 1354, in shutdown
    h.flush()
TypeError: flush() takes exactly 2 arguments (1 given)
我最近把项目移到了另一个目录,但其他的一切都很好,所以我不知道这是否与此有关

如果我只是启动开发服务器,然后立即关闭它,我看不到错误。只有当我在浏览器中单击一些然后关闭服务器时

有人能告诉我正确的方向来解决这个问题吗


提前感谢。

您似乎正在使用Mac的默认python安装。我知道大家都认为这件事有时会有一些奇怪的问题。我建议安装MacPython并将Django安装到该python实例中

嗨,库巴西克,谢谢你的回答。不幸的是,在遵循上的说明之后,我仍然有同样的问题。如何确定我正在使用MacPython实例?ps:我添加了一些额外的信息(参见:只有在浏览项目页面时才会发生错误)