tags:

views:

236

answers:

1

Hey all, Whenever i shut down my development server (./manage.py runserver) with CTRL+c i get following message:

[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)

I recently moved the project to another directory, but everything else works fine, so i don't know if that has anything to do with it ...

If i just start the development server and then shut it down immediately, i do not see the error. Only when i click around some in the browser and then shut down the server...

Can anyone point me in the right direction to sort this one out plz?

Thanks in advance.

+2  A: 

It appears that you are using the Mac's default python install. I know this has been reputed to have odd issues from time to time. I would recommend install MacPython and installing Django into that python instance.

kkubasik
Hi kkubasik, thanks for the answer. Unfortunately after following the instructions on http://wiki.python.org/moin/MacPython/Leopard i still have the same problem. How can i be sure i am using the MacPython instance?ps: i added some additional info (cf. error only occurs when browsing project pages)
Jeroen Dierckx