[Bug 1446537] Re: apport hook fails in add_info with TypeError: 'str' does not support the buffer interface
Brian Murray
brian at ubuntu.com
Mon May 16 20:57:54 UTC 2016
>From the research I've done, it looks like this is a result of the
following change:
$ bzr log -r1369.34.1105 -p
------------------------------------------------------------
revno: 1369.34.1105
fixes bug: https://launchpad.net/bugs/1370259
committer: Martin Pitt <martin.pitt at canonical.com>
branch nick: apport
timestamp: Thu 2015-01-08 11:20:16 +0100
message:
* hookutils, attach_root_command_outputs(): Fix UnicodeDecodeError crash for non-textual values. (LP: #1370259)
diff:
=== modified file 'NEWS'
--- NEWS 2014-12-19 06:43:26 +0000
+++ NEWS 2015-01-08 10:20:16 +0000
@@ -1,6 +1,11 @@
This file summarizes the major and interesting changes for each release. For a
detailed list of changes, please see ChangeLog.
+2.15.2 (UNRELEASED)
+------------------
+ * hookutils, attach_root_command_outputs(): Fix UnicodeDecodeError crash for
+ non-textual values. (LP: #1370259)
+
2.15.1 (2014-12-19)
-------------------
* Robustify report.test_get_timestamp test.
=== modified file 'apport/hookutils.py'
--- apport/hookutils.py 2014-04-29 17:34:35 +0000
+++ apport/hookutils.py 2015-01-08 10:20:16 +0000
@@ -465,7 +465,7 @@
# now read back the individual outputs
for keyname in command_map:
try:
- with open(os.path.join(workdir, keyname)) as f:
+ with open(os.path.join(workdir, keyname), 'rb') as f:
buf = f.read().strip()
except IOError:
# this can happen if the user dismisses authorization in
This then makes the files added by the ubiquity hook bytes, which when
then can't check for strings in.
** Changed in: apport (Ubuntu)
Status: New => Triaged
** Changed in: apport (Ubuntu)
Importance: Undecided => High
** Changed in: apport (Ubuntu)
Assignee: (unassigned) => Martin Pitt (pitti)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apport in Ubuntu.
https://bugs.launchpad.net/bugs/1446537
Title:
apport hook fails in add_info with TypeError: 'str' does not support
the buffer interface
Status in apport package in Ubuntu:
Triaged
Bug description:
on vivid
⟫ ubuntu-bug ubiquity
dpkg-query: aucun paquet ne correspond à ubiquity
ERROR: hook /usr/share/apport/package-hooks/source_ubiquity.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/package-hooks/source_ubiquity.py", line 61, in add_info
if 'Buffer I/O error on device' in syslog:
TypeError: 'str' does not support the buffer interface
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: ubiquity (not installed)
ProcVersionSignature: Ubuntu 3.19.0-14.14-generic 3.19.3
Uname: Linux 3.19.0-14-generic x86_64
ApportVersion: 2.17.2-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Apr 21 10:15:56 2015
InstallationDate: Installed on 2013-09-03 (594 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Alpha amd64 (20130902)
SourcePackage: ubiquity
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1446537/+subscriptions
More information about the foundations-bugs
mailing list