Edgewall Software
Modify

Opened 13 years ago

Closed 13 years ago

#10689 closed defect (cantfix)

Error: unsupported locale setting

Reported by: rijeshpk@… Owned by:
Priority: normal Milestone:
Component: general Version: 0.12
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

How to Reproduce

While doing a GET operation on /browser, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'path': '/'}

User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20100101 Firefox/12.0

System Information

Trac 0.12
Genshi 0.6
mod_python 3.2.8
pysqlite 2.6.3
Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)]
setuptools 0.6c5
SQLite 3.3.6
Subversion 1.6.11 (r934486)
jQuery 1.4.2

Enabled Plugins

autocompleteusers N/A
TracAccountManager 0.3.2

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 513, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 256, in dispatch
    content_type)
  File "/usr/lib/python2.4/site-packages/trac/web/chrome.py", line 844, in render_template
    stream.render(method, doctype=doctype, out=buffer)
  File "/usr/lib/python2.4/site-packages/genshi/core.py", line 183, in render
    return encode(generator, method=method, encoding=encoding, out=out)
  File "/usr/lib/python2.4/site-packages/genshi/output.py", line 58, in encode
    for chunk in iterator:
  File "/usr/lib/python2.4/site-packages/genshi/output.py", line 339, in __call__
    for kind, data, pos in stream:
  File "/usr/lib/python2.4/site-packages/genshi/output.py", line 826, in __call__
    for kind, data, pos in stream:
  File "/usr/lib/python2.4/site-packages/genshi/output.py", line 670, in __call__
    for kind, data, pos in stream:
  File "/usr/lib/python2.4/site-packages/genshi/output.py", line 771, in __call__
    for kind, data, pos in chain(stream, [(None, None, None)]):
  File "/usr/lib/python2.4/site-packages/genshi/output.py", line 586, in __call__
    for ev in stream:
  File "/usr/lib/python2.4/site-packages/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/usr/lib/python2.4/site-packages/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/usr/lib/python2.4/site-packages/trac/web/chrome.py", line 945, in _strip_accesskeys
    for kind, data, pos in stream:
  File "/usr/lib/python2.4/site-packages/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/usr/lib/python2.4/site-packages/trac/web/chrome.py", line 934, in _generate
    for kind, data, pos in stream:
  File "/usr/lib/python2.4/site-packages/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/usr/lib/python2.4/site-packages/genshi/template/base.py", line 605, in _include
    for event in stream:
  File "/usr/lib/python2.4/site-packages/genshi/template/markup.py", line 378, in _match
    ctxt, start=idx + 1, **vars):
  File "/usr/lib/python2.4/site-packages/genshi/template/markup.py", line 378, in _match
    ctxt, start=idx + 1, **vars):
  File "/usr/lib/python2.4/site-packages/genshi/template/markup.py", line 327, in _match
    for event in stream:
  File "/usr/lib/python2.4/site-packages/genshi/template/base.py", line 545, in _flatten
    for kind, data, pos in stream:
  File "/usr/lib/python2.4/site-packages/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/usr/lib/python2.4/site-packages/genshi/path.py", line 588, in _generate
    subevent = next()
  File "/usr/lib/python2.4/site-packages/genshi/template/base.py", line 605, in _include
    for event in stream:
  File "/usr/lib/python2.4/site-packages/genshi/template/markup.py", line 316, in _strip
    event = next()
  File "/usr/lib/python2.4/site-packages/genshi/template/base.py", line 545, in _flatten
    for kind, data, pos in stream:
  File "/usr/lib/python2.4/site-packages/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/usr/lib/python2.4/site-packages/genshi/path.py", line 588, in _generate
    subevent = next()
  File "/usr/lib/python2.4/site-packages/genshi/template/base.py", line 605, in _include
    for event in stream:
  File "/usr/lib/python2.4/site-packages/genshi/template/markup.py", line 316, in _strip
    event = next()
  File "/usr/lib/python2.4/site-packages/genshi/template/base.py", line 565, in _flatten
    result = _eval_expr(data, ctxt, vars)
  File "/usr/lib/python2.4/site-packages/genshi/template/base.py", line 277, in _eval_expr
    retval = expr.evaluate(ctxt)
  File "/usr/lib/python2.4/site-packages/genshi/template/eval.py", line 178, in evaluate
    return eval(self.code, _globals, {'__data__': data})
  File "/usr/lib/python2.4/site-packages/trac/versioncontrol/templates/dir_entries.html", line 24, in <Expression u"chgset_view and dateinfo(change.date) or '\u2013'">
    ${chgset_view and dateinfo(change.date) or '&ndash;'}
  File "/usr/lib/python2.4/site-packages/trac/timeline/web_ui.py", line 264, in dateinfo
    precision='second')
  File "/usr/lib/python2.4/site-packages/trac/timeline/web_ui.py", line 297, in get_timeline_link
    iso_date = display_date = format_datetime(date, 'iso8601', req.tz)
  File "/usr/lib/python2.4/site-packages/trac/util/datefmt.py", line 150, in format_datetime
    encoding = locale.getpreferredencoding() or sys.getdefaultencoding()
  File "/usr/lib64/python2.4/locale.py", line 417, in getpreferredencoding
    setlocale(LC_CTYPE, "")
  File "/usr/lib64/python2.4/locale.py", line 381, in setlocale
    return _setlocale(category, locale)
Error: unsupported locale setting

Attachments (0)

Change History (1)

comment:1 by Jun Omae, 13 years ago

Resolution: cantfix
Status: newclosed

It seems an InstallationIssue. Please check LANG environment variable and set a valid locale (e.g. LANG=C, LANG=en_US.UTF8, etc…).

BTW, locale.getpreferredencoding is not thread-safe. I don't think that format_datetime() should call it?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.