Fixed.
users.create_login_url(request.get_full_path().encode('utf-8'))
add "encode('utf-8').
On Nov 22, 9:09 pm, maverick <[EMAIL PROTECTED]> wrote:
> 'ascii' codec can't encode characters in position 5-6: ordinal not in
> range(128)
>
> --# /base/data/home/apps/psf/2.329473269902644098/
> context_processors.py in gae_url
>
> 1. from google.appengine.api import users
> 2.
> 3. def gae_url(request):
> 4. params = {}
>
> 5. params['sign_in'] = users.create_login_url(request.get_full_path
> ()) ...
>
> 6. params['sign_out'] = users.create_logout_url
> (request.get_full_path())
> 7. return params
>
> 138. Returns:
> 139. string
> 140. """
> 141. req = user_service_pb.StringProto()
> 142. resp = user_service_pb.StringProto()
> 143. req.set_value(dest_url)
> 144. try:
>
> 145. apiproxy_stub_map.MakeSyncCall('user', 'CreateLoginURL', req,
> resp) ...
>
> 146. except apiproxy_errors.ApplicationError, e:
> 147. if (e.application_error ==
> 148. user_service_pb.UserServiceError.REDIRECT_URL_TOO_LONG):
> 149. raise RedirectTooLongError
> 150. else:
> 151. raise e
>
> ▼ Local vars
> Variable Value
> dest_url
> u'/tag/\u968f\u7b14/'
> req
> <google.appengine.api.api_base_pb.StringProto instance at
> 0x9913b45f7e1f63b8>
> resp
> <google.appengine.api.api_base_pb.StringProto instance at
> 0x9913b45f7e1f67a8>
> # /base/python_lib/versions/1/google/appengine/api/
> apiproxy_stub_map.py in MakeSyncCall
>
> 39. response: protocol buffer for the response
> 40.
> 41. Raises:
> 42. apiproxy_errors.Error or a subclass.
> 43. """
> 44. stub = apiproxy.GetStub(service)
> 45. assert stub, 'No api proxy found for service "%s"' % service
>
> 46. stub.MakeSyncCall(service, call, request, response) ...
>
> 47.
> 48.
> 49. class APIProxyStubMap:
> 50. """Container of APIProxy stubs for more convenient unittesting.
> 51.
> 52. Stubs may be either trivial implementations of APIProxy services
> (e.g.
>
> ▶ Local vars
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" 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/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---