ascii can't decode error in 14.04 server install
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-quickstart |
Fix Released
|
High
|
Francesco Banconi | ||
juju-quickstart (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Trusty |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
Running juju-quickstart from a machine without locales installed and properly configured causes a traceback.
[Test Case]
Using juju-quickstart with the patch applied the following should not exit:
LC_ALL=C juju-quickstart -i
[Regression Potential]
The patch attempts to set encoding using urwid. If it fails the user is warned rather than the application printing a traceback. Regression potential is minimal.
[Original Bug Report]
Reported from a user in irc. They attempted to use juju-quickstart on 14.04 server install and got the following trace.
$ juju-quickstart
Traceback (most recent call last):
File "/usr/bin/
options = manage.setup()
File "/usr/lib/
_setup_env(options, parser)
File "/usr/lib/
parser, env_type_db, env_db, env_file)
File "/usr/lib/
views.env_index, env_type_db, env_db, save_callable)
File "/usr/lib/
loop.run()
File "/usr/lib/
self.screen.
File "/usr/lib/
return fn()
File "/usr/lib/
self.draw_screen()
File "/usr/lib/
canvas = self._topmost_
File "/usr/lib/
canv = fn(self, size, focus=focus)
File "/usr/lib/
self.top_
File "/usr/lib/
canv = fn(self, size, focus=focus)
File "/usr/lib/
focus and self.focus_part == 'header')
File "/usr/lib/
canv = fn(self, size, focus=focus)
File "/usr/lib/
canv = w.render((maxcol,), focus=focus and item_focus)
File "/usr/lib/
canv = fn(self, size, focus=focus)
File "/usr/lib/
canv = self._original_
File "/usr/lib/
canv = fn(self, size, focus=focus)
File "/usr/lib/
canv = SolidCanvas(
File "/usr/lib/
self._text, cs = apply_target_
File "/usr/lib/
s = s.encode( _target_encoding )
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2582' in position 0: ordinal not in range(128)
Related branches
- Juju GUI Hackers: Pending requested
-
Diff: 98 lines (+55/-0)2 files modifiedquickstart/cli/base.py (+20/-0)
quickstart/tests/cli/test_base.py (+35/-0)
Changed in juju-quickstart: | |
status: | Confirmed → Won't Fix |
status: | Won't Fix → Triaged |
status: | Triaged → In Progress |
assignee: | nobody → Francesco Banconi (frankban) |
Changed in juju-quickstart: | |
status: | In Progress → Fix Committed |
Changed in juju-quickstart: | |
status: | Fix Committed → Fix Released |
description: | updated |
Seems locale is missing from the install.
$ locale "en_GB. UTF-8" fo_FO.UTF- 8 "en_GB. UTF-8" fo_FO.UTF- 8 "en_GB. UTF-8" fo_FO.UTF- 8 fo_FO.UTF- 8 fo_FO.UTF- 8 fo_FO.UTF- 8 ON=fo_FO. UTF-8
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_GB.UTF-8
LANGUAGE=en_GB:en
LC_CTYPE=
LC_NUMERIC=
LC_TIME=fo_FO.UTF-8
LC_COLLATE=
LC_MONETARY=
LC_MESSAGES=
LC_PAPER=
LC_NAME=fo_FO.UTF-8
LC_ADDRESS=
LC_TELEPHONE=
LC_MEASUREMENT=
LC_IDENTIFICATI
LC_ALL=