TypeError: startswith first arg must be bytes or a tuple of bytes, not str

Bug #1170487 reported by Nightfall
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Expired
Medium
Unassigned

Bug Description

Reporting a bug against casper with "apport-cli casper" results in a report containing:

HookError_ubuntu:
 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 92, in add_info
     apport.hookutils.attach_conffiles(report, package, ui=ui)
   File "/usr/lib/python3/dist-packages/apport/hookutils.py", line 135, in attach_conffiles
     if contents == '[deleted]' or contents.startswith('[inaccessible'):
 TypeError: startswith first arg must be bytes or a tuple of bytes, not str

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: apport 2.9.2-0ubuntu8
ProcVersionSignature: Ubuntu 3.8.0-18.28-generic 3.8.6
Uname: Linux 3.8.0-18-generic i686
ApportVersion: 2.9.2-0ubuntu8
Architecture: i386
CasperVersion: 1.330
CrashReports:
 640:0:0:38630:2013-04-18 22:10:36.573443280 +0000:2013-04-18 22:10:36.573443280 +0000:/var/crash/_usr_bin_ubiquity-dm.0.crash
 640:0:0:1607739:2013-04-18 22:10:36.881444807 +0000:2013-04-18 22:10:31.289417078 +0000:/var/crash/_usr_bin_Xorg.0.crash
 640:999:999:435757:2013-04-18 22:10:30.977415531 +0000:2013-04-18 22:10:25.689389309 +0000:/var/crash/_usr_lib_kde4_libexec_kwin_opengl_test.999.crash
Date: Thu Apr 18 20:16:39 2013
LiveMediaBuild: Kubuntu 13.04 "Raring Ringtail" - Alpha i386 (20130418)
MarkForUpload: True
PackageArchitecture: all
SourcePackage: apport
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Nightfall (someoneelse) wrote :
Revision history for this message
Scott Moser (smoser) wrote :

Its pretty embarasing when someone runs 'ubuntu-bug' to report a bug and sees a stack trace.

Changed in apport (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Serhiy (xintx-ua) wrote :

Looks like I have the fix, trying it.

Changed in apport (Ubuntu):
assignee: nobody → Serhiy Zahoriya (xintx-ua)
Revision history for this message
Serhiy (xintx-ua) wrote :

But it looks fixed upstream.

Changed in apport (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Serhiy (xintx-ua) wrote :

It prevents all hooks from running and the resulting bug reports end up missing crucial files. It's not Medium, it's Critical, please someone change the importance.

Changed in apport (Ubuntu):
status: Fix Committed → In Progress
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "1170487.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Brian Murray (brian-murray) wrote :

This code is only reached if you've modified or deleted a conffile.

Serhiy (xintx-ua)
Changed in apport (Ubuntu):
assignee: Serhiy Zahoriya (xintx-ua) → nobody
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in apport (Ubuntu):
status: In Progress → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for apport (Ubuntu) because there has been no activity for 60 days.]

Changed in apport (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.