pynsource icon indicating copy to clipboard operation
pynsource copied to clipboard

Weird locale stuff

Open traverseda opened this issue 6 years ago • 3 comments

  File "/usr/lib/python3.7/locale.py", line 604, in setlocale
    return _setlocale(category, locale)

After commenting that line out everything seems to work fine, although I get a popup message complaining about the en.GB locale.

14:29:39: Cannot set locale to language "English".
14:29:39: locale 'en_GB' cannot be set.

traverseda avatar Jul 11 '19 17:07 traverseda

Yikes - never seen that. Will leave this issue open just in case others encounter it. Thanks for reporting it.

What country is your computer set to? Operating System? Keyboard?

Which line did you comment out - the actual Python 3.7 library code?

abulka avatar Jul 16 '19 08:07 abulka

Line 5 in src/layout/coordinate_mapper.py

As near as I can tell it's because I was having some locale issues, all my individual locale types were set but the fallback locale wasn't. I don't think that's a real problem most users are going to encounter, but adding a proper fallback to locale.setlocale(locale.LC_ALL, "fallback_locale") might help

traverseda avatar Jul 16 '19 15:07 traverseda

Hi, same stuff here.

Screenshot from 2021-02-22 10-04-48

Traceback:

Traceback (most recent call last):
  File "pynsource-gui.py", line 369, in OnInit
    StartCoroutine(self.check_for_updates, self)
  File "/home/claus/anaconda3/lib/python3.8/site-packages/wxasync.py", line 108, in StartCoroutine
    app.StartCoroutine(coroutine, obj)
  File "/home/claus/anaconda3/lib/python3.8/site-packages/wxasync.py", line 66, in StartCoroutine
    obj.Bind(wx.EVT_WINDOW_DESTROY, lambda event: self.OnDestroy(event, obj), obj)
  File "/home/claus/anaconda3/lib/python3.8/site-packages/wx/core.py", line 1456, in _EvtHandler_Bind
    assert source is None or hasattr(source, 'GetId')
AssertionError
OnInit returned false, exiting...

Running over Archlinux compilation 5.10.15-arch1-1

Python version 3.8.5

Locale set to en-US

Fuzzer11 avatar Feb 22 '21 13:02 Fuzzer11