Thanks, Malcolm!

For some reason, updating django to trunk solved it. My system admins
told me kindly that it's not their problem. Very nice indeed.


El vie, 19-10-2007 a las 21:12 +1000, Malcolm Tredinnick escribi�:
> On Fri, 2007-10-19 at 11:56 +0100, Chris Hoeppner wrote:
> > Hey guys!
> > 
> > I have no choice but deploy to this server, running CentOS 4.4, with no
> > option to upgrade python beyond 2.3, and I'm getting this:
> > 
> > Mod_python error: "PythonHandler django.core.handlers.modpython"
> > 
> > Traceback (most recent call last):
> > 
> >   File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 299, 
> > in HandlerDispatch
> >     result = object(req)
> > 
> >   File 
> > "/usr/lib/python2.3/site-packages/django/core/handlers/modpython.py", line 
> > 178, in handler
> >     return ModPythonHandler()(req)
> > 
> >   File 
> > "/usr/lib/python2.3/site-packages/django/core/handlers/modpython.py", line 
> > 155, in __call__
> >     response = middleware_method(request, response)
> > 
> >   File 
> > "/usr/lib/python2.3/site-packages/django/contrib/sessions/middleware.py", 
> > line 95, in process_response
> >     obj = Session.objects.get_new_session_object()
> > 
> >   File 
> > "/usr/lib/python2.3/site-packages/django/contrib/sessions/models.py", line 
> > 37, in get_new_session_object
> >     obj, created = 
> > self.get_or_create(session_key=self.get_new_session_key(),
> > 
> >   File 
> > "/usr/lib/python2.3/site-packages/django/contrib/sessions/models.py", line 
> > 19, in get_new_session_key
> >     session_key = md5.new("%s%s%s%s" % (random.randint(0, sys.maxint - 1), 
> > os.getpid(), time.time(), settings.SECRET_KEY)).hexdigest()
> > 
> > AttributeError: 'module' object has no attribute 'randint'
> 
> Something's a bit broken with your setup, then. Certainly
> random.randint() existedin Python 2.3 (I just tested it).
> 
> Do a quick test to confirm that it really is missing in a shell:
> 
>         Python 2.3.5 (#1, Mar 11 2007, 08:55:14) 
>         [GCC 4.1.1 20070105 (Red Hat 4.1.1-51)] on linux2
>         Type "help", "copyright", "credits" or "license" for more
>         information.
>         >>> import random
>         >>> random.randint
>         <bound method Random.randint of <random.Random object at
>         0x672110>>
> 
> If that fails, your python installation is very non-standard. You could
> also try looking at the results of "rpm -qV python" to check that there
> hasn't been any inadvertent (or deliberate) changes to the installed
> rpm.
> 
> Note sure what to suggest here. The problem looks to be in your
> installation. Start asking serious questions of the sys admin.
> 
> Regards,
> Malcolm
>         
> 
> 
> > 


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to