Skip to content

ValueError: unknown locale: UTF-8 #59

@lcx

Description

@lcx

I have this issue on every almir installation. I did solve it once, of course didn't write the solution down and I have no idea how to get almir starting again.

bin/supervisorctl restart all
HttpOk: stopped
Memmon: stopped
HttpOk: started
Memmon: started
almir: ERROR (abnormal termination)

Logfile:

Traceback (most recent call last):
  File "/opt/almir/bin/pserve", line 20, in <module>
    sys.exit(pyramid.scripts.pserve.main())
  File "/opt/almir/eggs/pyramid-1.3-py2.6.egg/pyramid/scripts/pserve.py", line 47, in main
    return command.run()
  File "/opt/almir/eggs/pyramid-1.3-py2.6.egg/pyramid/scripts/pserve.py", line 290, in run
    relative_to=base, global_conf=vars)
  File "/opt/almir/eggs/pyramid-1.3-py2.6.egg/pyramid/scripts/pserve.py", line 318, in loadapp
    return loadapp(app_spec, name=name, relative_to=relative_to, **kw)
  File "/opt/almir/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/opt/almir/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 271, in loadobj
    global_conf=global_conf)
  File "/opt/almir/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 296, in loadcontext
    global_conf=global_conf)
  File "/opt/almir/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 320, in _loadconfig
    return loader.get_context(object_type, name, global_conf)
  File "/opt/almir/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 454, in get_context
    section)
  File "/opt/almir/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 476, in _context_from_use
    object_type, name=use, global_conf=global_conf)
  File "/opt/almir/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 406, in get_context
    global_conf=global_conf)
  File "/opt/almir/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 296, in loadcontext
    global_conf=global_conf)
  File "/opt/almir/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 328, in _loadegg
    return loader.get_context(object_type, name, global_conf)
  File "/opt/almir/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 620, in get_context
    object_type, name=name)
  File "/opt/almir/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 646, in find_egg_entry_point
    possible.append((entry.load(), protocol, entry.name))
  File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2108, in load
  File "/opt/almir/almir/__init__.py", line 13, in <module>
    from almir.meta import initialize_sql
  File "/opt/almir/almir/meta.py", line 20, in <module>
    from almir.lib.utils import timedelta_to_seconds, convert_timezone
  File "/opt/almir/almir/lib/utils.py", line 3, in <module>
    from docutils.core import publish_parts
  File "/opt/almir/eggs/docutils-0.9.1-py2.6.egg/docutils/core.py", line 20, in <module>
    from docutils import frontend, io, utils, readers, writers
  File "/opt/almir/eggs/docutils-0.9.1-py2.6.egg/docutils/frontend.py", line 39, in <module>
    import docutils.utils
  File "/opt/almir/eggs/docutils-0.9.1-py2.6.egg/docutils/utils/__init__.py", line 19, in <module>
    from docutils.io import FileOutput
  File "/opt/almir/eggs/docutils-0.9.1-py2.6.egg/docutils/io.py", line 18, in <module>
    from docutils.error_reporting import locale_encoding, ErrorString, ErrorOutput
  File "/opt/almir/eggs/docutils-0.9.1-py2.6.egg/docutils/error_reporting.py", line 47, in <module>
    locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
  File "/usr/lib/python2.6/locale.py", line 478, in getdefaultlocale
    return _parse_localename(localename)
  File "/usr/lib/python2.6/locale.py", line 410, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8

my locale settings

LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8

OS: Debian Squeeze (6.x)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions