Django

Code

Ticket #2074 (closed: worksforme)

Opened 2 years ago

Last modified 2 years ago

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

Reported by: charlax Assigned to: adrian
Milestone: Component: django-admin.py
Version: SVN Keywords:
Cc: ca.dein@wanadoo.fr Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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.

Attachments

Change History

06/02/06 21:15:17 changed by pb@e-scribe.com

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.

06/03/06 04:23:54 changed by charlax <ca.dein@free.fr>

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.

06/03/06 06:44:54 changed 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?

06/03/06 07:12:18 changed by charlax <ca.dein@free.fr>

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

06/03/06 11:29:49 changed by adrian

  • status changed from new to closed.
  • resolution set to worksforme.

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

06/03/06 14:48:08 changed by charlax <ca.dein@free.fr>

Thanks for your help ! Now it works.

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


Add/Change #2074 (Development server doesn't work on Mac Os with Python-2.4.3)




Change Properties
Action