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

Thomas De Schampheleire patrickdepinguin at gmail.com
Wed Feb 17 10:53:53 UTC 2016


On Wed, Feb 17, 2016 at 11:33 AM, Angel Ezquerra
<angel.ezquerra at gmail.com> wrote:
> On Tue, Feb 16, 2016 at 5:35 PM, Mads Kiilerich <mads at kiilerich.com> wrote:
>> 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
>
> Mads,
>
> what is the best way to use a non released kallithea version?
> Currently I have Kallithea 0.3 which I installed via pip. Can I simply
> take the site-packages/kallithea directory that pip installed and
> replace it with the kallithea source code repo? Can I then simply
> update the repo to the head of default? Won't there be any problems
> with any of the dependencies?
>

The recommended installation method is described here:
http://kallithea.readthedocs.org/en/latest/installation.html
The title says 'Unix/Linux' but in fact I think the principle should
be the same in Windows.

(change stable to default)

hg clone https://kallithea-scm.org/repos/kallithea -u stable
cd kallithea
virtualenv ../kallithea-venv
source ../kallithea-venv/bin/activate
pip install --upgrade pip setuptools
python2 setup.py develop
python2 setup.py compile_catalog   # for translation of the UI


If you already have a virtualenv with kallithea installed via pip, I
think you should do the following:
- clone the repo and update to the desired branch
- from inside your virtualenv, run 'python2 setup.py develop' from the
kallithea repo.
- same with compile_catalog

I suggest you try it out first on a test location if you are already
running in production.

/Thomas


More information about the kallithea-general mailing list