Jeroen Dierckx
Jeroen Dierckx

Reputation: 1638

Django development server throws a shutdown error

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.

What can I try next?

Upvotes: 3

Views: 1185

Answers (1)

kkubasik
kkubasik

Reputation: 3734

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.

Upvotes: 2

Related Questions