Edgewall Software

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#9444 closed defect (worksforme)

Installation 0.12: ValueError: expected only letters, got 'utf-8'

Reported by: Thijs Triemstra <lists@…> Owned by:
Priority: normal Milestone:
Component: general Version: 0.12
Severity: major Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:


This is on OSX 10.6.3 with a Python 2.6.5 built from source.

$ sudo easy_install-2.6 trac
install_dir /usr/local/lib/python2.6/site-packages/
Searching for trac
Reading http://pypi.python.org/simple/trac/
Reading http://trac.edgewall.org/
Reading http://trac.edgewall.org/wiki/TracDownload
Reading http://trac.edgewall.com/
Reading http://projects.edgewall.com/trac
Reading http://projects.edgewall.com/trac/wiki/TracDownload
Best match: Trac 0.12
Downloading http://pypi.python.org/packages/source/T/Trac/Trac-0.12.tar.gz#md5=b60f2b982b749abbb252bee575373c8b
Processing Trac-0.12.tar.gz
Running Trac-0.12/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ufbp_T/Trac-0.12/egg-dist-tmp-2TYRAD
Traceback (most recent call last):
  File "/usr/bin/easy_install-2.6", line 9, in <module>
    load_entry_point('distribute==0.6.13', 'console_scripts', 'easy_install-2.6')()
  File "/usr/local/lib/python2.6/site-packages/distribute-0.6.13-py2.6.egg/setuptools/command/easy_install.py", line 1853, in main
  File "/usr/local/lib/python2.6/site-packages/distribute-0.6.13-py2.6.egg/setuptools/command/easy_install.py", line 1834, in with_ei_usage
    return f()
  File "/usr/local/lib/python2.6/site-packages/distribute-0.6.13-py2.6.egg/setuptools/command/easy_install.py", line 1857, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "/usr/local/lib/python2.6/distutils/core.py", line 152, in setup
  File "/usr/local/lib/python2.6/distutils/dist.py", line 975, in run_commands
  File "/usr/local/lib/python2.6/distutils/dist.py", line 995, in run_command
  File "/usr/local/lib/python2.6/site-packages/distribute-0.6.13-py2.6.egg/setuptools/command/easy_install.py", line 342, in run
    self.easy_install(spec, not self.no_deps)
  File "/usr/local/lib/python2.6/site-packages/distribute-0.6.13-py2.6.egg/setuptools/command/easy_install.py", line 581, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/usr/local/lib/python2.6/site-packages/distribute-0.6.13-py2.6.egg/setuptools/command/easy_install.py", line 611, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/local/lib/python2.6/site-packages/distribute-0.6.13-py2.6.egg/setuptools/command/easy_install.py", line 800, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/local/lib/python2.6/site-packages/distribute-0.6.13-py2.6.egg/setuptools/command/easy_install.py", line 1077, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/local/lib/python2.6/site-packages/distribute-0.6.13-py2.6.egg/setuptools/command/easy_install.py", line 1066, in run_setup
    run_setup(setup_script, args)
  File "/usr/local/lib/python2.6/site-packages/distribute-0.6.13-py2.6.egg/setuptools/sandbox.py", line 29, in run_setup
    lambda: execfile(
  File "/usr/local/lib/python2.6/site-packages/distribute-0.6.13-py2.6.egg/setuptools/sandbox.py", line 70, in run
    return func()
  File "/usr/local/lib/python2.6/site-packages/distribute-0.6.13-py2.6.egg/setuptools/sandbox.py", line 31, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 33, in <module>
  File "/tmp/easy_install-ufbp_T/Trac-0.12/trac/util/__init__.py", line 35, in <module>
  File "/tmp/easy_install-ufbp_T/Trac-0.12/trac/util/text.py", line 28, in <module>
  File "/tmp/easy_install-ufbp_T/Trac-0.12/trac/util/translation.py", line 106, in <module>
  File "/usr/local/lib/python2.6/site-packages/Babel-0.9.5-py2.6.egg/babel/support.py", line 29, in <module>
    from babel.dates import format_date, format_datetime, format_time, LC_TIME
  File "/usr/local/lib/python2.6/site-packages/Babel-0.9.5-py2.6.egg/babel/dates.py", line 34, in <module>
    LC_TIME = default_locale('LC_TIME')
  File "/usr/local/lib/python2.6/site-packages/Babel-0.9.5-py2.6.egg/babel/core.py", line 642, in default_locale
    return '_'.join(filter(None, parse_locale(locale)))
  File "/usr/local/lib/python2.6/site-packages/Babel-0.9.5-py2.6.egg/babel/core.py", line 763, in parse_locale
    raise ValueError('expected only letters, got %r' % lang)
ValueError: expected only letters, got 'utf-8'

Attachments (0)

Change History (6)

comment:1 by Christian Boos, 14 years ago

Milestone: 0.12.1
Resolution: worksforme
Status: newclosed

I can reproduce the problem easily by setting LC_TIME to utf-8. But a legal value should be <locale-name>[.<encoding>], e.g. nl_NL.utf-8 (see valid values by using locale -a).

comment:2 by Thijs Triemstra <lists@…>, 14 years ago

But… out of the box Trac installations using easy_install will fail on OSX? OSX doesn't seem to have a default for LC_TIME. And I don't even know how to set LC_TIME.. Isn't it possible to provide a default?

comment:3 by Thijs Triemstra <lists@…>, 14 years ago

After issuing:

export LC_TIME=en_GB.UTF-8

it still reports the same error with easy_install.

comment:4 by Thijs Triemstra <lists@…>, 14 years ago

I just installed a different Python package that also depends on Babel and got the same error so it's definitely not Trac specific but a Babel thing so forget about the 2 previous comments. I might bug Babel about it.

comment:5 by Thijs Triemstra <lists@…>, 14 years ago

And there's already a ticket for Babel, open for a while now: http://babel.edgewall.org/ticket/200.

comment:6 by anonymous, 14 years ago

The problem was that Babel could not determine the language - it looks for the following environment variables 'LANGUAGE', 'LC_ALL', 'LC_CTYPE' for a locale, eg "en_US". If it does not find such a locale (as it won't on Mac OS X), it somehow picks up UTF-8 and borks. The solution is therefore to set the environment variable to your locale, eg:

export LANGUAGE=en_US

Modify Ticket

Change Properties
Set your email in Preferences
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.