This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vincent.chute
Recipients vincent.chute
Date 2008-06-09.12:08:06
SpamBayes Score 5.941427e-05
Marked as misclassified No
Message-id <1213013354.87.0.861327880823.issue3067@psf.upfronthosting.co.za>
In-reply-to
Content
import locale
locale.setlocale( locale.LC_ALL, u'ja_JP.utf8')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/locale.py", line 475, in setlocale
    locale = normalize(_build_localename(locale))
  File "/usr/lib/python2.5/locale.py", line 383, in _build_localename
    language, encoding = localetuple
ValueError: too many values to unpack

The problem is line 473:
    if locale and type(locale) is not type(""):

Replacing this with
     if locale and not isinstance(locale, basestring):
fixes the problem.
History
Date User Action Args
2008-06-09 12:09:15vincent.chutesetspambayes_score: 5.94143e-05 -> 5.941427e-05
recipients: + vincent.chute
2008-06-09 12:09:15vincent.chutesetspambayes_score: 5.94143e-05 -> 5.94143e-05
messageid: <1213013354.87.0.861327880823.issue3067@psf.upfronthosting.co.za>
2008-06-09 12:08:13vincent.chutelinkissue3067 messages
2008-06-09 12:08:12vincent.chutecreate