On Thu, 2007-11-01 at 04:50 +0000, Julio César Carrascal Urquijo wrote: > I'm installing Django on a shared hosting account but I've been > fighting the las two hours with this error: > > /home/<user>/django_src/django/contrib/sessions/middleware.py in > process_request(self=<django.contrib.sessions.middleware.SessionMiddleware > object>, request=<WSGIRequest GET:<QueryDict: {}>, > POST:<QueryDic...gi.url_scheme': 'http', 'wsgi.version': (1, 0)}>) > 13 engine = __import__(settings.SESSION_ENGINE, {}, {}, > ['']) > 14 session_key = > request.COOKIES.get(settings.SESSION_COOKIE_NAME, None) > 15 request.session = engine.SessionStore(session_key) > 16 > 17 def process_response(self, request, response): > request = <WSGIRequest GET:<QueryDict: {}>, > POST:<QueryDic...gi.url_scheme': 'http', 'wsgi.version': (1, 0)}>, > request.session undefined, engine = <module > 'django.contrib.sessions.backends.db' fr...ngo_src/django/contrib/ > sessions/backends/db.pyc'>, engine.SessionStore undefined, session_key > = None > > AttributeError: 'module' object has no attribute 'SessionStore' > args = ("'module' object has no attribute 'SessionStore'",) > > It's probably something I missed because It goes away if I disable the > session middleware (that means I can't use auth or admin apps) so at > least the core of Django is working. > > I took a look at the values of settings.SESSION_ENGINE and engine: > > * settings.SESSION_ENGINE was 'django.contrib.sessions.backends.db' > * engine.__file__ was '/home/<user>/django_src/django/contrib/sessions/ > backends/db.pyc' > > which seems correct, but... > > * dir(engine) was ['__builtins__', '__doc__', '__file__', '__name__', > 'settings'] > > ... an empty module. Anyone knows why this might be happening?
I have no suggestions to offer here. I can't repeat this using Python 2.3 and latest subversion trunk (as you're using). I don't have mod_fastcgi set up for testing, though, so it might be something special going on there, but I can't imagine what it would be. If you run the same commands from the "manage.py shell" prompt, does it work? That is, do something like >>> from django.conf import settings >>> engine = __import__(settings.SESSION_ENGINE, {}, {},['']) >>> dir(engine) That should show more than you saw above. If it doesn't, I'm back to being stuff, because I don't know what's going on. If there are differences, your checkout is incomplete somehow. Regards, Malcolm -- I don't have a solution, but I admire your problem. http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---