Fwd: Error when registering a user with a non ASCII character

Mads Kiilerich mads at kiilerich.com
Tue Feb 16 16:35:22 UTC 2016


On 02/16/2016 08:41 AM, Angel Ezquerra wrote:
> Hi,
>
> one of my users tried to register into our Kallithea server. His last
> name contains a non ASCII character (é, i.e. an accented e). This
> resulted in the following error (which I have redacted a bit to avoid
> leaking personal info). The relevant part seems to be the
> "('lastname', 'Jim\xc3\xa9nez')".

> Module kallithea.model.user:199 in create_registration
>
> <<              '- Full Name: {user.full_name}\n'
>                     '- Email: {user.email}\n'
>                     ).format(user=new_user)
>                 edit_url = h.canonical_url('edit_user', id=new_user.user_id)
>                 email_kwargs = {
>
>>>   ).format(user=new_user)
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in
> position 9: ordinal not in range(128)

That is on the stable branch? I think I solved that on the default 
branch in 
https://kallithea-scm.org/repos/kallithea/changeset/330c671dd451#kallitheamodeluserpy_o194 
. Can you test and confirm that? Then I will put just that part of the 
change on the stable branch.

(We use the default branch in production.)

/Mads


More information about the kallithea-general mailing list