New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error locale.getlocale() with LANGUAGE=eu_ES #42101
Comments
I had sumited this bug (id 1177674) and it has been My locale is set to LANGUAGE=eu_ES This is what i get in the interpreter Python 2.4.1 (#2, Mar 30 2005, 21:51:10) >>> import locale
>>> locale.getlocale()
(None, None)
>>> locale.setlocale(locale.LC_ALL, '')
'eu_ES'
>>>
>>> locale.getlocale()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/locale.py", line 365, in
getlocale
return _parse_localename(localename)
File "/usr/lib/python2.4/locale.py", line 278, in
_parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: eu_ES
>>> |
Logged In: YES What do you need locale.getlocale() for? If it is to |
Logged In: YES this bug is REAL and major IMO any app that uses localization cannot be runned by a basque python is not aware of eu_ES at all! I don't know if this solves it (I'm not basque) --- /usr/lib/python2.4/locale.py 2005-11-12
11:59:16.000000000 +0200
+++ /tmp/locale.py 2005-11-13 23:27:27.000000000 +0200
@@ -481,6 +481,7 @@
'ar_aa': 'ar_AA.ISO8859-6',
'ar_sa': 'ar_SA.ISO8859-6',
'arabic': 'ar_AA.ISO8859-6',
+ 'basque': 'eu_ES.ISO8859-1',
'bg': 'bg_BG.ISO8859-5',
'bg_bg': 'bg_BG.ISO8859-5',
'bulgarian': 'bg_BG.ISO8859-5',
@@ -540,6 +541,7 @@
'es_ve': 'es_VE.ISO8859-1',
'et': 'et_EE.ISO8859-4',
'et_ee': 'et_EE.ISO8859-4',
+ 'eu_ES': 'eu_ES.ISO8859-1',
'fi': 'fi_FI.ISO8859-1',
'fi_fi': 'fi_FI.ISO8859-1',
'finnish': 'fi_FI.ISO8859-1', btw for this not to happen again (sad to see py242 not Zunbeltz Izaola is a courageous man, and please loweis think |
Logged In: YES It was a candid question: why do you need getlocale()? This Before such a step can be taken, I need to know why people |
Logged In: YES python itself uses this func, I don't even ask getlocale()! I just do: time.strptime(tim, '%Y%m%dT%H:%M:%S') somewhere and enjoy: time.strptime(tim, '%Y%m%dT%H:%M:%S')
File "/usr/lib/python2.4/_strptime.py", line 269, in ?
_TimeRE_cache = TimeRE()
File "/usr/lib/python2.4/_strptime.py", line 188, in __init__
self.locale_time = LocaleTime()
File "/usr/lib/python2.4/_strptime.py", line 73, in __init__
self.lang = _getlang()
File "/usr/lib/python2.4/_strptime.py", line 32, in _getlang
return locale.getlocale(locale.LC_TIME)
File "/usr/lib/python2.4/locale.py", line 363, in getlocale
return _parse_localename(localename)
File "/usr/lib/python2.4/locale.py", line 278, in
_parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: eu_ES so basque feels like he's ATIA here |
Logged In: YES Not so fast, Martin. I know that you don't like the Note that this bug is fixed in CVS: I updated the locale database with the most recent X.org |
From msg60764 "Note that this bug is fixed in CVS:". I'd test myself, but the last time I tried soemthing like this it took me ages to persuade Windows Calendar that I wasn't Dutch. |
Closing the report: eu_es has been Python for quite a while (at least since Python 2.5). If you also feel that 'basque' should be added as alias, please provide proof that this alias is really in use and open a new bug report. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: