Opened 9 years ago

Closed 9 years ago

Last modified 8 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
Component: Core (Management commands) Version: master
Severity: normal Keywords:
Cc: ca.dein@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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 Changed 9 years ago by pb@…

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 Changed 9 years ago by charlax <ca.dein@…>

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 Changed 9 years ago by ubernostrum

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 Changed 9 years ago by charlax <ca.dein@…>

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

comment:5 Changed 9 years ago by adrian

  • Resolution set to worksforme
  • Status changed from new to closed

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

comment:6 Changed 9 years ago by charlax <ca.dein@…>

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