locale 'C' prevents linux installation from completing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
calibre |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
If LC_ALL=C or the system locale is set to 'C', then the following occurs on linux, as of calibre-1.33:
Setting up command-line completion...
_______
Setting up completion failed with error:
_______
Traceback (most recent call last):
File "/var/tmp/
from calibre.
File "/var/tmp/
from calibre.
File "/var/tmp/
ul = parse_lang_
File "/var/tmp/
raise ValueError('Invalid language code: %r' % raw)
ValueError: Invalid language code: 'C'
Tracing through the code, get_system_locale() returns 'C' as is expected; parse_lang_code() then calls canonicalize_
I have successfully bypassed this (with a fully-working calibre so far as I can tell) by skipping the rase of the ValueError when parse_lang_code() is passed 'C' , but I'm thinking that it would probably be more correct to either have get_system_locale() return nothing if the locale is 'C' (so long as this is fine for other uses of get_system_
Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.
status fixreleased