Incorrect codec use, HookError_ubuntu.txt

Bug #1509136 reported by Seth Arnold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
New
Undecided
Unassigned

Bug Description

Bug #1509020 is the second instance of an apport-reported bug that includes the following HookError_ubuntu.txt contents:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport/report.py", line 197, in _run_hook
    symb['add_info'](report, ui)
  File "/usr/share/apport/general-hooks/ubuntu.py", line 66, in add_info
    check_attachment_for_errors(report, attachment)
  File "/usr/share/apport/general-hooks/ubuntu.py", line 155, in check_attachment_for_errors
    trim_dpkg_log(report)
  File "/usr/share/apport/general-hooks/ubuntu.py", line 440, 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 440, in <listcomp>
    report['DpkgTerminalLog'] = '\n'.join([str(line.decode('utf-8')) for line in lines])
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe2 in position 11584: invalid continuation byte

Obviously the specific byte and the position were different in the other bug report. Apport is assuming some input should be in utf8 but it is a byte stream instead, one that probably depends upon the user's locale.

Thanks

Revision history for this message
Seth Arnold (seth-arnold) wrote :

Bug #1509302 is another instance where HookError_ubuntu.txt shows this bug: https://launchpadlibrarian.net/222269771/HookError_ubuntu.txt

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.