I checked /usr/share/apport/general-hooks/ubuntu.py in Ubuntu 18.04
(bionic) and 22.04 (jammy) and they are fixed:

        report['DpkgTerminalLog'] = '\n'.join([str(line.decode('UTF-8', 
'replace')) for line in lines])

** Changed in: apport (Ubuntu)
       Status: Triaged => Fix Released

You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apport in Ubuntu.

  traceback in ubuntu.py's trim_dpkg_log function

Status in apport package in Ubuntu:
  Fix Released
Status in apport source package in Xenial:
  Fix Released

Bug description:
  smoser@milhouse:~/src/maas-images/trunk$ sudo apport-bug 
  [sudo] password for smoser: 
  sys:1: PyGIWarning: Wnck was imported without specifying a version first. Use 
gi.require_version('Wnck', '3.0') before import to ensure that the right 
version gets loaded.
  sys:1: PyGIWarning: GdkX11 was imported without specifying a version first. 
Use gi.require_version('GdkX11', '3.0') before import to ensure that the right 
version gets loaded.
  ERROR: hook /usr/share/apport/general-hooks/ubuntu.py crashed:
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/apport/report.py", line 197, in 
      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 170, in 
    File "/usr/share/apport/general-hooks/ubuntu.py", line 468, in trim_dpkg_log
      report['DpkgTerminalLog'] = '\n'.join([str(line.encode('utf-8')) for line 
in lines])
    File "/usr/share/apport/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'

  seems like a python2 to python3 conversion bug.

  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: apport 2.20-0ubuntu3
  ProcVersionSignature: Ubuntu 4.4.0-2.16-generic 4.4.0
  Uname: Linux 4.4.0-2-generic x86_64
  NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
  ApportVersion: 2.20-0ubuntu3
  Architecture: amd64
   640:0:116:846362:2016-02-22 12:27:09.709648847 -0500:2016-02-22 
12:27:10.709648847 -0500:/var/crash/libtesseract4.0.crash
   644:0:116:0:2016-02-22 12:27:11.629635693 -0500:2016-02-22 
12:27:11.629635693 -0500:/var/crash/libtesseract4.0.upload
  CurrentDesktop: Unity
  Date: Mon Feb 22 12:35:39 2016
  EcryptfsInUse: Yes
  InstallationDate: Installed on 2015-07-23 (214 days ago)
  InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Alpha amd64 (20150722.1)
  PackageArchitecture: all
  SourcePackage: apport
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:

Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to