X Tutup
Skip to content

locale.Error: unsupported locale setting #217

@ikanobori

Description

@ikanobori

If the environment variable LANG is not set, but LC_CTYPE is, bpython fails with the traceback:

#!python

Traceback (most recent call last):
  File "/usr/bin/bpython-2.7", line 9, in <module>
    load_entry_point('bpython==0.11', 'console_scripts', 'bpython')()
  File "/usr/lib/python2.7/site-packages/bpython/cli.py", line 1849, in main
    locale.setlocale(locale.LC_ALL, "")
  File "/usr/lib/python2.7/locale.py", line 539, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

Changing line 1849 of cli.py to

#!python

 locale.setlocale(locale.LC_ALL, locale.getdefaultlocale())

fixes the traceback.

Christian Tanzer tanzer@swing.co.at


Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup