UnicodeDecodeError when logging stdout/stderr

Bug #1374224 reported by Sam Stavinoha
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
satori
New
Undecided
Unassigned

Bug Description

The traceback provided is from here:

https://github.com/stackforge/satori/blob/master/satori/ssh.py#L465-L470

This error could potentially occur in these places:

https://github.com/stackforge/satori/blob/master/satori/sysinfo/ohai_solo.py#L117
https://github.com/stackforge/satori/blob/master/satori/sysinfo/ohai_solo.py#L124-L125

Here's all of the information around the exception, starting with the traceback.

Traceback (most recent call last):
  File "~/.virtualenvs/satori-dev/local/lib/python2.7/site-packages/satori/ssh.py" line 467, in remote_execute
    results['stdout'])
  File "/usr/lib/python2.7/logging/__init__.py" line 1133, in debug
    self._log(DEBUG, msg, args, **kwargs)
  File "/usr/lib/python2.7/logging/__init__.py" line 1263, in _log
    self.handle(record)
  File "/usr/lib/python2.7/logging/__init__.py" line 1273, in handle
    self.callHandlers(record)
  File "/usr/lib/python2.7/logging/__init__.py" line 1313, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python2.7/logging/__init__.py" line 753, in handle
    self.emit(record)
  File "/usr/lib/python2.7/logging/__init__.py" line 851, in emit
    msg = self.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 724, in format
    result = fmt.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 464, in format
    record.message = record.getMessage()
  File "/usr/lib/python2.7/logging/__init__.py", line 328, in getMessage
    msg = msg % self.args
UnicodeDecodeError: 'ascii' codec cant decode byte 0xe2 in position 334: ordinal not in range(128)

.
.

Exception instance attributes
=============================

{'args': ('ascii',
          '--2014-09-26 01:50:55-- http://ohai.rax.io/install.sh'
          'Resolving ohai.rax.io... 2001:2030:d::50ef:b2b3, 2001:2030:d::50ef:b2ba, 80.239.178.179, ...'
          'Connecting to ohai.rax.io|2001:2030:d::50ef:b2b3|:80... connected.'
          'HTTP request sent, awaiting response... 200 OK'
          'Length: 13203 (13K) [application/x-www-form-urlencoded]'
          'Saving to: “install.sh”'
          ' '
          '100%[======================================>] 13,203 --.-K/s in 0s'
          ' '
          '2014-09-26 01:50:55 (413 MB/s) - “install.sh” saved [13203/13203]',
          334,
          335,
          'ordinal not in range(128)'),
 'encoding': 'ascii',
 'end': 335,
 'message': '',
 'object': '--2014-09-26 01:50:55-- http://ohai.rax.io/install.sh\r\nResolving ohai.rax.io... 2001:2030:d::50ef:b2b3, 2001:2030:d::50ef:b2ba, 80.239.178.179, ...\r\nConnecting to ohai.rax.io|2001:2030:d::50ef:b2b3|:80... connected.\r\nHTTP request sent, awaiting response... 200 OK\r\nLength: 13203 (13K) [application/x-www-form-urlencoded]\r\nSaving to: \xe2\x80\x9cinstall.sh\xe2\x80\x9d\r\n\r\n\r 0% [ ] 0 --.-K/s \r100%[======================================>] 13,203 --.-K/s in 0s \r\n\r\n2014-09-26 01:50:55 (413 MB/s) - \xe2\x80\x9cinstall.sh\xe2\x80\x9d saved [13203/13203]',
 'reason': 'ordinal not in range(128)',
 'start': 334}

Revision history for this message
Sam Stavinoha (smlstvnh) wrote :
description: updated
description: updated
description: updated
description: updated
description: updated
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.