Comment 10 for bug 1548421

Revision history for this message
Brian Murray (brian-murray) wrote : Re: python stacktrace during 'apport-bug'

The fix for this doesn't seem to work in every case. For example:

[ 1:00PM 10791 ] [ bdmurray@impulse:~/source-trees/bugpatterns/master ]
 $ ./download-crash 1571220
rusage before getting report: 25740
rusage after getting report: 51840
rusage after writing report: 51840
LP: #1571220: No match
[ 1:02PM 10792 ] [ bdmurray@impulse:~/source-trees/bugpatterns/master ]
 $ python3 /usr/share/apport/general-hooks/ubuntu.py ~/source-trees/bugpatterns/master/report-1571220.crash
Traceback (most recent call last):
  File "/usr/share/apport/general-hooks/ubuntu.py", line 502, in <module>
    add_info(new_report, None)
  File "/usr/share/apport/general-hooks/ubuntu.py", line 70, in add_info
    check_attachment_for_errors(report, attachment)
  File "/usr/share/apport/general-hooks/ubuntu.py", line 176, in check_attachment_for_errors
    trim_dpkg_log(report)
  File "/usr/share/apport/general-hooks/ubuntu.py", line 476, in trim_dpkg_log
    report['DpkgTerminalLog'] = '\n'.join([str(line.decode('utf-8')) for line in lines])
  File "/usr/share/apport/general-hooks/ubuntu.py", line 476, in <listcomp>
    report['DpkgTerminalLog'] = '\n'.join([str(line.decode('utf-8')) for line in lines])
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd1 in position 101: invalid continuation byte

This was on yakkety but the code is the zesty and xenial.