Issue #209: Improper display of locale Ru (conservancy/kallithea)

Evgeniy Bondarenko issues-reply at bitbucket.org
Wed Apr 13 14:37:24 UTC 2016


New issue 209: Improper display of locale Ru
https://bitbucket.org/conservancy/kallithea/issues/209/improper-display-of-locale-ru

Evgeniy Bondarenko:

When change string config file, from:
```
#!bash

default_encoding = utf8
```

to

```
#!bash

default_encoding = ru_RU.utf8
```


I have  error below, but locale installed in OS.
How to fix the incorrect display of the locale in the web interface? 

```
#!python


2016-04-13 14:32:43.248 INFO  [kallithea.model] initializing db for sqlite:////kallithea/config/kallithea.db?timeout=60
2016-04-13 14:32:43.249 INFO  [kallithea.lib.auth] getting information about all available permissions
Traceback (most recent call last):
  File "/usr/local/bin/paster", line 11, in <module>
    sys.exit(run())
  File "/usr/local/lib/python2.7/dist-packages/paste/script/command.py", line 102, in run
    invoke(command, command_name, options, args[1:])
  File "/usr/local/lib/python2.7/dist-packages/paste/script/command.py", line 141, in invoke
    exit_code = runner.run(args)
  File "/usr/local/lib/python2.7/dist-packages/paste/script/command.py", line 236, in run
    result = self.command()
  File "/usr/local/lib/python2.7/dist-packages/paste/script/serve.py", line 284, in command
    relative_to=base, global_conf=vars)
  File "/usr/local/lib/python2.7/dist-packages/paste/script/serve.py", line 329, in loadapp
    **kw)
  File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
    return context.create()
  File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
    return self.object_type.invoke(self)
  File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 146, in invoke
    return fix_call(context.object, context.global_conf, **context.local_conf)
  File "/usr/local/lib/python2.7/dist-packages/paste/deploy/util.py", line 55, in fix_call
    val = callable(*args, **kw)
  File "/kallithea/kallithea/kallithea/config/middleware.py", line 56, in make_app
    config = load_environment(global_conf, app_conf)
  File "/kallithea/kallithea/kallithea/config/environment.py", line 117, in load_environment
    repos_path = make_ui('db').configitems('paths')[0][1]
  File "/kallithea/kallithea/kallithea/lib/utils.py", line 368, in make_ui
    ui_val = safe_str(ui_.ui_value)
  File "/kallithea/kallithea/kallithea/lib/utils2.py", line 264, in safe_str
    return unicode_.encode(enc)
LookupError: unknown encoding: ru_RU.utf8
```


```
#!bash

# locale -a
C
C.UTF-8
POSIX
en_US.utf8
ru_RU.utf8

# dpkg-reconfigure locales
Generating locales...
  en_US.UTF-8... up-to-date
  ru_RU.UTF-8... up-to-date
Generation complete.
```


System:


```
#!python

Kallithea version:
    0.3.1 Check for updates
Kallithea configuration file:
    /kallithea/config/kallithea.ini
Python version:
    2.7.6
Platform:
    Linux-3.13.0-77-generic-x86_64-with-Ubuntu-14.04-trusty
Версия Git:
    1.9.1
Git path:
    git
Upgrade info endpoint:

    Note: please make sure this server can access this URL.

Python Packages
amqplib 	1.0.2
anyjson 	0.3.3
argparse 	1.2.1
Babel 	1.3
Beaker 	1.6.4
celery 	2.2.10
chardet 	2.0.1
colorama 	0.2.5
decorator 	4.0.9
docutils 	0.11
dulwich 	0.9.9
FormEncode 	1.2.6
funcsigs 	0.4
html5lib 	0.999
Kallithea 	0.3.1
kombu 	1.5.1
Mako 	1.0.0
Markdown 	2.2.1
MarkupSafe 	0.23
mercurial 	3.7.2
mock 	1.3.0
MySQL-python 	1.2.5
nose 	1.3.7
Paste 	2.0.3
PasteDeploy 	1.5.2
PasteScript 	2.0.2
pbr 	1.8.1
pip 	8.1.1
psycopg2 	2.6.1
py-bcrypt 	0.4
Pygments 	2.1.3
Pylons 	1.0.2
pyparsing 	1.5.7
Python 	2.7.6
python-dateutil 	1.5
python-ldap 	2.4.10
pytz 	2016.1
repoze.lru 	0.6
requests 	2.2.1
Routes 	1.13
setuptools 	20.3
simplejson 	3.8.2
six 	1.10.0
SQLAlchemy 	0.7.10
Tempita 	0.5.2
urllib3 	1.7.1
URLObject 	2.3.4
waitress 	0.8.8
WebError 	0.13
WebHelpers 	1.3
WebOb 	1.1.1
WebTest 	1.4.3
wheel 	0.24.0
Whoosh 	2.5.7
wsgiref 	0.1.2


```



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sfconservancy.org/pipermail/kallithea-general/attachments/20160413/d594aa44/attachment.html>


More information about the kallithea-general mailing list