You are Here:
Linux Lite 4.4 Final has been released. See the Release Announcements section for more information.



Terminal error message on each time it opens - unknown locale: en_IL

Author (Read 719 times)

0 Members and 2 Guests are viewing this topic.

 

eladkarako

  • New to Forums
  • *
  • 3
    Posts
  • Country: il
  • Reputation: 1
  • Linux Lite Member

  • Linux Lite: 4.2 64bit

  • CPU: 2Core - VirtualBox

  • MEMORY: 2Gb

  • VIDEO CARD: VirtualBox
I've installed a clean 4.2, added Hebrew as a supported language right after first-time system-update and driver-update (buttons).
Each time I open the terminal I get a Traceback related to a language that does not exist.
As far as I know Hebrew encoding is 'he_IL' while English languages are usually 'en_*' (en_UK, en_US,..).
It seems that adding a language that is not English kept the preset 'en_'.

Quote
Code: [Select]
Traceback (most recent call last):
  File "/usr/bin/powerline-config", line 6, in <module>
    from powerline.commands.config import get_argparser
  File "/usr/lib/python2.7/dist-packages/powerline/commands/config.py", line 6, in <module>
    import powerline.bindings.config as config
  File "/usr/lib/python2.7/dist-packages/powerline/bindings/config.py", line 19, in <module>
    from powerline.commands.main import finish_args
  File "/usr/lib/python2.7/dist-packages/powerline/commands/main.py", line 18, in <module>
    encoding = get_preferred_arguments_encoding()
  File "/usr/lib/python2.7/dist-packages/powerline/lib/encoding.py", line 89, in get_preferred_arguments_encoding
    locale.getdefaultlocale()[1]
  File "/usr/lib/python2.7/locale.py", line 545, in getdefaultlocale
    return _parse_localename(localename)
  File "/usr/lib/python2.7/locale.py", line 477, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: en_IL
Traceback (most recent call last):
  File "/usr/bin/powerline-config", line 6, in <module>
    from powerline.commands.config import get_argparser
  File "/usr/lib/python2.7/dist-packages/powerline/commands/config.py", line 6, in <module>
    import powerline.bindings.config as config
  File "/usr/lib/python2.7/dist-packages/powerline/bindings/config.py", line 19, in <module>
    from powerline.commands.main import finish_args
  File "/usr/lib/python2.7/dist-packages/powerline/commands/main.py", line 18, in <module>
    encoding = get_preferred_arguments_encoding()
  File "/usr/lib/python2.7/dist-packages/powerline/lib/encoding.py", line 89, in get_preferred_arguments_encoding
    locale.getdefaultlocale()[1]
  File "/usr/lib/python2.7/locale.py", line 545, in getdefaultlocale
    return _parse_localename(localename)
  File "/usr/lib/python2.7/locale.py", line 477, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: en_IL
Welcome to Linux Lite 4.2 me
 
Tuesday 12 February 2019, 18:17:37
Memory Usage: 353/1993MB (17.71%)
Disk Usage: 8/59GB (15%)
Support - https://www.linuxliteos.com/forums/ (Right click, Open Link)

 


Re: Terminal error message on each time it opens - unknown locale: en_IL
« Reply #1 on: February 12, 2019, 02:50:31 PM »
 

eladkarako

  • New to Forums
  • *
  • 3
    Posts
  • Country: il
  • Reputation: 1
  • Linux Lite Member

  • Linux Lite: 4.2 64bit

  • CPU: 2Core - VirtualBox

  • MEMORY: 2Gb

  • VIDEO CARD: VirtualBox
I've (re)installed Linux-Lite 4.2,
but now I've used the default (English) keyboard layout,
used New-York TimeZone and avoided updating packages, avoided installing drivers and avoided adding additional language-support (previous, I think that this step the the automatic re-configuration of installed-programs that followed might caused the bug).
It resulted with a perfectly working terminal, with 'that colorful' (python based?) command-prompt (which, previously, I think was the program that broke after adding the Hebrew-language support).
 

Re: Terminal error message on each time it opens - unknown locale: en_IL
« Reply #2 on: February 12, 2019, 09:40:30 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3185
    Posts
  • Country: 00
  • Reputation: 299

  • Linux Lite: 3.2 64bit
Hello eladkarako,

on this link
   
https://stackoverflow.com/questions/29850912/decoding-and-encoding-hebrew-string-in-python
 
in the answer it discusses adding

Code: [Select]
#!/usr/bin/env python
# -*- coding: utf-8 -*-


to the top of the Python script, to ensure the right encoding, the first line of this will already be there, also to check the terminal is accepting this encoding.

Also you may like this -  http://www.python.org.il/
Last Edit: February 12, 2019, 09:49:34 PM by bitsnpcs
 


 


Linux Lite 4.4 Final has been released. See the Release Announcements section for more information.