[Bug 1548421] Re: python stacktrace during 'apport-bug'

Martin Pitt martin.pitt at ubuntu.com
Wed May 18 09:13:30 UTC 2016

Hello Scott, or anyone else affected,

Accepted apport into xenial-proposed. The package will build now and be
available at
https://launchpad.net/ubuntu/+source/apport/2.20.1-0ubuntu2.1 in a few
hours, and then in the -proposed repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to
enable and use -proposed.  Your feedback will aid us getting this update
out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, and change the tag
from verification-needed to verification-done. If it does not fix the
bug for you, please add a comment stating that, and change the tag to
verification-failed.  In either case, details of your testing will help
us make a better decision.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in

** Changed in: apport (Ubuntu Xenial)
       Status: In Progress => Fix Committed

** Tags added: verification-needed

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

  python stacktrace during 'apport-bug'

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

Bug description:
  smoser at milhouse:~/src/maas-images/trunk$ sudo apport-bug /var/crash/libtesseract4.0.crash
  [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 _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 170, in check_attachment_for_errors
    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:

More information about the foundations-bugs mailing list