Open GoogleCodeExporter opened 9 years ago
I have the same issue:
Traceback (most recent call last):
File "/home/carlos/sources/tipfy_project/app/distlib/tipfy/__init__.py", line 442, in wsgi_app
response = self.handle_exception(request, e)
File "/home/carlos/sources/tipfy_project/app/distlib/tipfy/__init__.py", line 430, in wsgi_app
rv = self.dispatch(request)
File "/home/carlos/sources/tipfy_project/app/distlib/tipfy/__init__.py", line 559, in dispatch
return handler(self, request)(method, **request.rule_args)
File "/home/carlos/sources/tipfy_project/app/distlib/tipfy/__init__.py", line 165, in __call__
response = method(*args, **kwargs)
File "/home/carlos/sources/tipfy_project/app/lib/users/handlers.py", line 181, in get
return self.get_authenticated_user(self._on_auth)
File "/home/carlos/sources/tipfy_project/app/distlib/tipfy/ext/auth/google.py", line 120, in get_authenticated_user
return OpenIdMixin.get_authenticated_user(self, callback)
File "/home/carlos/sources/tipfy_project/app/distlib/tipfy/ext/auth/openid.py", line 81, in get_authenticated_user
url = openid_endpoint + '?' + urllib.urlencode(args)
File "/usr/local/python2.5/lib/python2.5/urllib.py", line 1250, in urlencode
v = quote_plus(str(v))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 2:
ordinal not in range(128)
I fix it changing:
args = dict((k, v[-1]) for k, v in self.request.args.lists())
by:
args = dict((k, v[-1].encode('utf-8')) for k, v in self.request.args.lists())
in tipfy/ext/auth/openid.py (line 79).
Original comment by carlos.e...@gmail.com
on 31 Mar 2011 at 10:11
Original issue reported on code.google.com by
*...@simonpayne.cz
on 15 Jan 2011 at 1:53Attachments: