Kodi Community Forum

Full Version: locale.py ( ValueError: unknown locale: en-us )
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
OS: XB1-X
Kodi Version: Kodi 18.0 (18.0-ALPHA1 Git:20171226-2a6b4e9)
Known Addons Affected: Yahoo Weather, Emby for Kodi
Full Log: [Removed]
Relevant Error Snippet from Yahoo Weather Addon:
07:46:58.568 T:4668 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.ValueError'>
Error Contents: unknown locale: en-us
Traceback (most recent call last):
File "U:\Users\UserMgr0\AppData\Local\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalState\addons\weather.yahoo\default.py", line 5, in <module>
import _strptime
File "S:\Program Files\WindowsApps\XBMCFoundation.Kodi_17.9.103.70_x64__4n2hpmxwrvr6p\system\python\Lib\_strptime.py", line 274, in <module>
_TimeRE_cache = TimeRE()
File "S:\Program Files\WindowsApps\XBMCFoundation.Kodi_17.9.103.70_x64__4n2hpmxwrvr6p\system\python\Lib\_strptime.py", line 192, in __init__
self.locale_time = LocaleTime()
File "S:\Program Files\WindowsApps\XBMCFoundation.Kodi_17.9.103.70_x64__4n2hpmxwrvr6p\system\python\Lib\_strptime.py", line 70, in __init__
self.lang = _getlang()
File "S:\Program Files\WindowsApps\XBMCFoundation.Kodi_17.9.103.70_x64__4n2hpmxwrvr6p\system\python\Lib\_strptime.py", line 29, in _getlang
return locale.getlocale(locale.LC_TIME)
File "S:\Program Files\WindowsApps\XBMCFoundation.Kodi_17.9.103.70_x64__4n2hpmxwrvr6p\system\python\Lib\locale.py", line 564, in getlocale
return _parse_localename(localename)
File "S:\Program Files\WindowsApps\XBMCFoundation.Kodi_17.9.103.70_x64__4n2hpmxwrvr6p\system\python\Lib\locale.py", line 477, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: en-us
-->End of Python script error report<--
07:46:58.574 T:5272 DEBUG: ------ Window Init (DialogNotification.xml) ------
07:46:58.576 T:4668 INFO: Python script stopped

This same exact error is shown for the Emby for Kodi addon also, although I did not install it for this log to save time.
Both addons use _strptime.py so I'm assuming this bug affects any addon that uses _strptime.py and/or locale.py.

Willing to help if needed in any way I can. If more info is needed, just let me know. Thanks! \m/
Resolved with Jan 6th build. -  Kodi (18.0-ALPHA1 Git:20180106-aacfabc)