Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#2074 closed defect (worksforme)

Development server doesn't work on Mac Os with Python-2.4.3

Reported by: charlax Owned by: Adrian Holovaty
Component: Core (Management commands) Version: dev
Severity: normal Keywords:
Cc: ca.dein@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I run the development server with python 2.4.3 :

ibook-g4-de-charlax:~/temp/test/django/test1 ca$ python
Python 2.4.3 (#1, May 25 2006, 02:02:07) 
[GCC 4.0.1 (Apple Computer, Inc. build 5247)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 
ibook-g4-de-charlax:~/temp/test/django/test1 ca$ python manage.py runserver
Validating models...
0 errors found.

Django version 0.95 (post-magic-removal), using settings 'test1.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

No error for the moment. Then I load http://127.0.0.1:8000/ in my browser. I get this error :

Traceback (most recent call last):

  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/core/servers/basehttp.py", line 272, in run
    self.result = application(self.environ, self.start_response)

  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/core/servers/basehttp.py", line 615, in __call__
    return self.application(environ, start_response)

  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/core/handlers/wsgi.py", line 140, in __call__
    self.load_middleware()

  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/core/handlers/base.py", line 31, in load_middleware
    raise exceptions.ImproperlyConfigured, 'Error importing middleware %s: "%s"' % (mw_module, e)

ImproperlyConfigured: Error importing middleware django.middleware.sessions: "No module named sessions"

Then I reload the page, and it works fine, but after each change I won't work until I reload the page.

With Python-2.3 there's no problem.

Change History (6)

comment:1 by pb@…, 18 years ago

I think you may need to do a little more digging on this. I'm not seeing any problems running the dev server with a current svn checkout [3069], Python 2.4.3, OS X 10.4.6.

comment:2 by charlax <ca.dein@…>, 18 years ago

I also use the current svn checkout (3069), Python 2.4.3, OS X 10.4.5
I will dig a bit more, but I really don't see where the problem come from.

comment:3 by James Bennett, 18 years ago

Using Django SVN with dev server just fine on OS X 10.4.6 with Python 2.4.3.

What happens if you remove the session middleware from the list of middleware in your settings.py?

comment:4 by charlax <ca.dein@…>, 18 years ago

It works fine after removing django.middleware.sessions.SessionMiddleware.

comment:5 by Adrian Holovaty, 18 years ago

Resolution: worksforme
Status: newclosed

Seems like this is a setup problem, not a Django bug.

comment:6 by charlax <ca.dein@…>, 18 years ago

Thanks for your help ! Now it works.

It was effectively a setup problem : there was a lot of django version coexisting on my Mac.

Note: See TracTickets for help on using tickets.
Back to Top