With the old version of the general ubuntu hook we get a traceback:
$ python3 data/general-hooks/ubuntu.py ~/source-trees/bugpatterns/master/report-1581664.crash
Traceback (most recent call last):
File "data/general-hooks/ubuntu.py", line 494, in <module>
add_info(new_report, None)
File "data/general-hooks/ubuntu.py", line 66, in add_info
check_attachment_for_errors(report, attachment)
File "data/general-hooks/ubuntu.py", line 170, in check_attachment_for_errors
trim_dpkg_log(report)
File "data/general-hooks/ubuntu.py", line 468, in trim_dpkg_log
report['DpkgTerminalLog'] = '\n'.join([str(line.encode('utf-8')) for line in lines])
File "data/general-hooks/ubuntu.py", line 468, in <listcomp>
report['DpkgTerminalLog'] = '\n'.join([str(line.encode('utf-8')) for line in lines])
AttributeError: 'bytes' object has no attribute 'encode'
Using apport from -proposed we see:
$ python3 /usr/share/apport/general-hooks/ubuntu.py ~/source-trees/bugpatterns/master/report-1581664.crash
dpkg-query: no packages found matching kaccounts-providers
0 items changed
With the old version of the general ubuntu hook we get a traceback:
$ python3 data/general- hooks/ubuntu. py ~/source- trees/bugpatter ns/master/ report- 1581664. crash hooks/ubuntu. py", line 494, in <module> info(new_ report, None) hooks/ubuntu. py", line 66, in add_info attachment_ for_errors( report, attachment) hooks/ubuntu. py", line 170, in check_attachmen t_for_errors dpkg_log( report) hooks/ubuntu. py", line 468, in trim_dpkg_log 'DpkgTerminalLo g'] = '\n'.join( [str(line. encode( 'utf-8' )) for line in lines]) hooks/ubuntu. py", line 468, in <listcomp> 'DpkgTerminalLo g'] = '\n'.join( [str(line. encode( 'utf-8' )) for line in lines])
Traceback (most recent call last):
File "data/general-
add_
File "data/general-
check_
File "data/general-
trim_
File "data/general-
report[
File "data/general-
report[
AttributeError: 'bytes' object has no attribute 'encode'
Using apport from -proposed we see:
$ python3 /usr/share/ apport/ general- hooks/ubuntu. py ~/source- trees/bugpatter ns/master/ report- 1581664. crash
dpkg-query: no packages found matching kaccounts-providers
0 items changed