"unknown locale:us" error

Help
fjs
2005-02-28
2013-04-26
  • fjs
    fjs
    2005-02-28

    Hi,
    Trying to use DrPython 3.10.12 and I get this error on tryig to open a file or set preferences:
    ==================================
    root@9[drpython-3.10.12]# ./drpython.lin
    Traceback (most recent call last):
      File "/mnt/hdb6/PYREF/drpython-3.10.12/drpython.py", line 2088, in OnOpen
        dlg = drFileDialog.FileDialog(self, "Open", self.prefs.wildcard, MultipleSelection=True, ShowRecentFiles=True)
      File "/mnt/hdb6/PYREF/drpython-3.10.12/drFileDialog.py", line 1031, in FileDialog
        return drFileDialog(parent, title, wildcard, point, size, IsASaveDialog, MultipleSelection, ShowRecentFiles)
      File "/mnt/hdb6/PYREF/drpython-3.10.12/drFileDialog.py", line 413, in __init__
        defaultlocale = locale.getdefaultlocale()[1]
      File "/usr/lib/python2.3/locale.py", line 346, in getdefaultlocale
        return _parse_localename(localename)
      File "/usr/lib/python2.3/locale.py", line 280, in _parse_localename
        raise ValueError, 'unknown locale: %s' % localename
    ValueError: unknown locale: us
    Traceback (most recent call last):
      File "/mnt/hdb6/PYREF/drpython-3.10.12/drpython.py", line 2208, in OnPrefs
        d = drPrefsDialog(self, -1, "DrPython - Preferences")
      File "/mnt/hdb6/PYREF/drpython-3.10.12/drPrefsDialog.py", line 1172, in __init__
        self.pnlGeneral = GeneralPanel(self.lbPrefs, -1, "General")
      File "/mnt/hdb6/PYREF/drpython-3.10.12/drPrefsDialog.py", line 676, in __init__
        defaultlocale = locale.getdefaultlocale()[1]
      File "/usr/lib/python2.3/locale.py", line 346, in getdefaultlocale
        return _parse_localename(localename)
      File "/usr/lib/python2.3/locale.py", line 280, in _parse_localename
        raise ValueError, 'unknown locale: %s' % localename
    ValueError: unknown locale: us
    ================================
    Running linux with Python 2.3.4 & wxPython 2.5.3.1.
    Any help appreciated.
    Thanks

     
    • Hey,

        I am just checking in on things briefly in the forums, and will not be back actively to investigate this for a bit, while I pack, find a place to live, and prepare for the drive south.

        When I get back, I will check this out.  I'd suggest filing this as a bug, and attaching an example file that does not work.

      You are running wxPython 2.5.3.1 GTK2 Unicode I presume?

      I you do not need the unicode, I highly recommend switching to the ansi bit, at least for now.

       
    • Got it.  This is locale misbehaving.  I put in a check for this in 3.10.13, which will be out as soon as I can.