Ask Your Question

Unicode error

asked 2011-06-16 04:22:59 -0600

DominiCattus's avatar

updated 2011-06-16 13:00:52 -0600

Evgeny's avatar

I have an unicode error when using user with Cyrillic name and going to Profile -> Email subscriptions.
The traceback:


Request Method: GET
Request URL:

Django Version: 1.3
Python Version: 2.6.6
Installed Applications:
Installed Middleware:

File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "/home/projects/sites/jungland/src/forum/askbot/views/" in user
  963.     return user_view_func(request, profile_owner, context)
File "/home/projects/sites/jungland/src/forum/askbot/views/" in wrapped_func
  64.         return f(request, profile_owner, context)
File "/usr/local/lib/python2.6/dist-packages/django/utils/" in _wrapped_view
  93.                     response = view_func(request, *args, **kwargs)
File "/home/projects/sites/jungland/src/forum/askbot/views/" in user_email_subscriptions
  882.     logging.debug(get_request_info(request))
File "/home/projects/sites/jungland/src/forum/askbot/utils/" in get_request_info
  44.     info += 'user: %s\n' % request.user

Exception Type: UnicodeDecodeError at /users/4/reguliator/
Exception Value: 'ascii' codec can't decode byte 0xd0 in position 6: ordinal not in range(128)

The user is actually named Регулятор. Actually this happens only if you are logged in as Регулятор and go to YOUR subscriptions. if you are logged as other user, it's OK.

edit retag flag offensive close merge delete


Yes, I've reproduced this. Will fix shortly.
Evgeny's avatar Evgeny  ( 2011-06-16 12:35:07 -0600 )edit
Works on this site now, just tested.
Evgeny's avatar Evgeny  ( 2011-06-16 13:01:13 -0600 )edit
looks like there is another one!!! will need to go through through all uses of the username in any output. I made a quick hack fix on this site though.
Evgeny's avatar Evgeny  ( 2011-06-17 01:49:36 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2011-06-16 12:56:27 -0600

Evgeny's avatar

Fixed in 0.6.98. Thanks.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-06-16 04:22:59 -0600

Seen: 304 times

Last updated: Jun 16 '11