Opened 18 years ago

Last modified 18 years ago

#3424 closed

Admin zone breaks — at Initial Version

Reported by: aribao@… Owned by: Adrian Holovaty
Component: Core (Management commands) Version: 0.95
Severity: Keywords: django, a2b_base64(), admin, mysql 5, collation
Cc: aribao@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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

  1. response = callback(request, *callback_args, callback_kwargs)

File "/var/lib/python-support/python2.4/django/contrib/admin/views/decorators.py" in _checklogin

  1. 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

  1. user_id = request.session[SESSION_KEY]

File "/var/lib/python-support/python2.4/django/contrib/sessions/middleware.py" in getitem

  1. return self._session[key]

File "/var/lib/python-support/python2.4/django/contrib/sessions/middleware.py" in _get_session

  1. self._session_cache = s.get_decoded()

File "/var/lib/python-support/python2.4/django/contrib/sessions/models.py" in get_decoded

  1. 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.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top