#3424: Admin zone breaks
---------------------------------------------------------------+------------
   Reporter:  [EMAIL PROTECTED]                                 |               
 Owner:  adrian         
     Status:  new                                              |            
Component:  django-admin.py
    Version:  0.95                                             |           
Resolution:                 
   Keywords:  django, a2b_base64(), admin, mysql 5, collation  |                
Stage:  Unreviewed     
  Has_patch:  0                                                |           
Needs_docs:  0              
Needs_tests:  0                                                |   
Needs_better_patch:  0              
---------------------------------------------------------------+------------
Changes (by ubernostrum):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Old description:

> Hello, I'm using Debian sid, python 2.4 (and 2.5), django 0.95.1, and
> mysql 5. The tables created have collation utf8-bin.
> When I tried to open the admin zone, I got this error:
> 
> Traceback (most recent call last):
> File "/var/lib/python-support/python2.4/django/core/handlers/base.py" in
> get_response
>   74. response = callback(request, *callback_args, **callback_kwargs)
> File "/var/lib/python-
> support/python2.4/django/contrib/admin/views/decorators.py" in
> _checklogin
>   49. if request.user.is_authenticated() and request.user.is_staff:
> File "/var/lib/python-support/python2.4/django/contrib/auth/__init__.py"
> in get_user
>   71. user_id = request.session[SESSION_KEY]
> File "/var/lib/python-
> support/python2.4/django/contrib/sessions/middleware.py" in __getitem__
>   18. return self._session[key]
> File "/var/lib/python-
> support/python2.4/django/contrib/sessions/middleware.py" in _get_session
>   57. self._session_cache = s.get_decoded()
> File "/var/lib/python-
> support/python2.4/django/contrib/sessions/models.py" in get_decoded
>   61. encoded_data = base64.decodestring(self.session_data)
> 
>   TypeError at /admin/
>   a2b_base64() argument 1 must be string or read-only character buffer,
> not array.array
> 
> I solved it changing the collation of the field session_data in the
> django_session table from utf8-bin to latin1_general_ci.
> There is a bug using utf8-bin in that field.
> 
> Thank you.

New description:

 Hello, I'm using Debian sid, python 2.4 (and 2.5), django 0.95.1, and
 mysql 5. The tables created have collation utf8-bin.
 When I tried to open the admin zone, I got this error:
 
 {{{
 Traceback (most recent call last):
 File "/var/lib/python-support/python2.4/django/core/handlers/base.py" in
 get_response
   74. response = callback(request, *callback_args, **callback_kwargs)
 File "/var/lib/python-
 support/python2.4/django/contrib/admin/views/decorators.py" in _checklogin
   49. if request.user.is_authenticated() and request.user.is_staff:
 File "/var/lib/python-support/python2.4/django/contrib/auth/__init__.py"
 in get_user
   71. user_id = request.session[SESSION_KEY]
 File "/var/lib/python-
 support/python2.4/django/contrib/sessions/middleware.py" in __getitem__
   18. return self._session[key]
 File "/var/lib/python-
 support/python2.4/django/contrib/sessions/middleware.py" in _get_session
   57. self._session_cache = s.get_decoded()
 File "/var/lib/python-support/python2.4/django/contrib/sessions/models.py"
 in get_decoded
   61. encoded_data = base64.decodestring(self.session_data)
 
   TypeError at /admin/
   a2b_base64() argument 1 must be string or read-only character buffer,
 not array.array
 }}}
 
 I solved it changing the collation of the field session_data in the
 django_session table from utf8-bin to latin1_general_ci.
 There is a bug using utf8-bin in that field.
 
 Thank you.

Comment:

 (fixed traceback formatting)

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3424#comment:1>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to