Comment 0 for bug 1444662

Revision history for this message
Maciej Kisielewski (kissiel) wrote : plainbox crashes when run from remote OSX host through SSH

Steps to reproduce:

from OSX ssh into ubuntu (utopic in my case)
get trunk of lp:checkbox
create venv and activate it
run any job, e.g. $ plainbox run -i "2013.com.canonical.certification::led/caps-lock"

This happens:

Traceback (most recent call last):
  File "/home/kissiel/FUBAR/checkbox/plainbox/plainbox/impl/clitools.py", line 560, in dispatch_and_catch_exceptions
    return self.dispatch_command(ns)
  File "/home/kissiel/FUBAR/checkbox/plainbox/plainbox/impl/clitools.py", line 556, in dispatch_command
    return ns.command.invoked(ns)
  File "/home/kissiel/FUBAR/checkbox/plainbox/plainbox/impl/commands/cmd_run.py", line 45, in invoked
    self.provider_loader, self.config_loader, ns, ns.color).run()
  File "/home/kissiel/FUBAR/checkbox/plainbox/plainbox/impl/commands/inv_run.py", line 356, in run
    return self.do_normal_sequence()
  File "/home/kissiel/FUBAR/checkbox/plainbox/plainbox/impl/commands/inv_run.py", line 403, in do_normal_sequence
    self.export_and_send_results()
  File "/home/kissiel/FUBAR/checkbox/plainbox/plainbox/impl/commands/inv_run.py", line 814, in export_and_send_results
    self._save_results(self.ns.output_file, exported_stream)
  File "/home/kissiel/FUBAR/checkbox/plainbox/plainbox/impl/commands/inv_run.py", line 831, in _save_results
    copyfileobj(input_stream, translating_stream)
  File "/home/kissiel/FUBAR/checkbox/venv/lib/python3.4/shutil.py", line 69, in copyfileobj
    fdst.write(buf)
  File "/home/kissiel/FUBAR/checkbox/plainbox/plainbox/impl/exporter/__init__.py", line 359, in write
    return self.dest_stream.write(data.decode(self.encoding))
UnicodeEncodeError: 'ascii' codec can't encode character '\u2611' in position 8: ordinal not in range(128)
Traceback (most recent call last):
  File "/home/kissiel/FUBAR/checkbox/venv/bin/plainbox", line 9, in <module>
    load_entry_point('plainbox==0.21.dev', 'console_scripts', 'plainbox')()
  File "/home/kissiel/FUBAR/checkbox/plainbox/plainbox/impl/box.py", line 122, in main
    raise SystemExit(PlainBoxTool().main(argv))
  File "/home/kissiel/FUBAR/checkbox/plainbox/plainbox/impl/clitools.py", line 324, in main
    return self.dispatch_and_catch_exceptions(ns)
  File "/home/kissiel/FUBAR/checkbox/plainbox/plainbox/impl/clitools.py", line 560, in dispatch_and_catch_exceptions
    return self.dispatch_command(ns)
  File "/home/kissiel/FUBAR/checkbox/plainbox/plainbox/impl/clitools.py", line 556, in dispatch_command
    return ns.command.invoked(ns)
  File "/home/kissiel/FUBAR/checkbox/plainbox/plainbox/impl/commands/cmd_run.py", line 45, in invoked
    self.provider_loader, self.config_loader, ns, ns.color).run()
  File "/home/kissiel/FUBAR/checkbox/plainbox/plainbox/impl/commands/inv_run.py", line 356, in run
    return self.do_normal_sequence()
  File "/home/kissiel/FUBAR/checkbox/plainbox/plainbox/impl/commands/inv_run.py", line 403, in do_normal_sequence
    self.export_and_send_results()
  File "/home/kissiel/FUBAR/checkbox/plainbox/plainbox/impl/commands/inv_run.py", line 814, in export_and_send_results
    self._save_results(self.ns.output_file, exported_stream)
  File "/home/kissiel/FUBAR/checkbox/plainbox/plainbox/impl/commands/inv_run.py", line 831, in _save_results
    copyfileobj(input_stream, translating_stream)
  File "/home/kissiel/FUBAR/checkbox/venv/lib/python3.4/shutil.py", line 69, in copyfileobj
    fdst.write(buf)
  File "/home/kissiel/FUBAR/checkbox/plainbox/plainbox/impl/exporter/__init__.py", line 359, in write
    return self.dest_stream.write(data.decode(self.encoding))
UnicodeEncodeError: 'ascii' codec can't encode character '\u2611' in position 8: ordinal not in range(128)
(venv)kissiel@lilly:~/FUBAR/checkbox$

locale output:
http://paste.ubuntu.com/10828447/

The ‘data’ var from the trace contains following : b' \x1b[32;1m\xe2\x98\x91 \x1b[0m: led/caps-lock\n'