update-manager crashed with AttributeError in __init__(): 'AptTerminal' object has no attribute 'set_pty_object'

Bug #1377152 reported by Swarnendu Biswas
64
This bug affects 11 people
Affects Status Importance Assigned to Milestone
aptdaemon (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

I am using Ubuntu Utopic, and have the two Gnome ppas added. I did an update, and the update manager listed updates ready to be upgraded. However, update manager crashes as I press install button to start installing.

This happened twice, so it should be reproducible.

ProblemType: Crash
DistroRelease: Ubuntu 14.10
Package: update-manager 1:14.10.6
ProcVersionSignature: Ubuntu 3.16.0-20.27-generic 3.16.3
Uname: Linux 3.16.0-20-generic x86_64
ApportVersion: 2.14.7-0ubuntu2
Architecture: amd64
CrashCounter: 1
CurrentDesktop: GNOME
Date: Fri Oct 3 09:08:38 2014
ExecutablePath: /usr/bin/update-manager
InstallationDate: Installed on 2014-09-30 (3 days ago)
InstallationMedia: Ubuntu-GNOME 14.10 "Utopic Unicorn" - Alpha amd64 (20140929)
InterpreterPath: /usr/bin/python3.4
PackageArchitecture: all
ProcCmdline: /usr/bin/python3 /usr/bin/update-manager
PythonArgs: ['/usr/bin/update-manager']
SourcePackage: update-manager
Title: update-manager crashed with AttributeError in __init__(): 'AptTerminal' object has no attribute 'set_pty_object'
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm bumblebee cdrom dip lpadmin plugdev sambashare sudo

Revision history for this message
Swarnendu Biswas (swarna-cse) wrote :
tags: removed: need-duplicate-check
Changed in update-manager (Ubuntu):
importance: Undecided → Medium
affects: update-manager (Ubuntu) → aptdaemon (Ubuntu)
information type: Private → Public
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in aptdaemon (Ubuntu):
status: New → Confirmed
Revision history for this message
Krešo Kunjas (deresh) wrote :
Revision history for this message
Krešo Kunjas (deresh) wrote :

i have found a quickfix if anyone is interested ;)

Problem is that newer libvte changed api (as of now 0.38.x in gnome ppa - 0.36 is in ubuntu repos.)

For a quickfix just apply this patch to gtk3widgets.py in /usr/lib/python3/dist-packages/aptdaemon

Patch attached.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "patch for newer libvte (0.38 or newer)" 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 is fixed in Vivid.

 $ bzr log -r-1 -p
------------------------------------------------------------
revno: 981 [merge]
committer: Martin Pitt <email address hidden>
branch nick: aptdaemon
timestamp: Tue 2014-11-11 07:39:37 +0100
message:
  Port to vte 2.91 API
diff:
=== modified file 'aptdaemon/gtk3widgets.py'
--- aptdaemon/gtk3widgets.py 2014-06-26 07:07:15 +0000
+++ aptdaemon/gtk3widgets.py 2014-11-10 18:03:20 +0000
@@ -38,6 +38,9 @@
 import pty
 import re

+import gi
+gi.require_version("Vte", "2.91")
+
 import apt_pkg
 from gi.repository import GObject
 from gi.repository import GLib
@@ -391,7 +394,7 @@
         self._master, self._slave = pty.openpty()
         self._ttyname = os.ttyname(self._slave)
         self.set_size(80, 24)
- self.set_pty_object(Vte.Pty.new_foreign(self._master))
+ self.set_pty(Vte.Pty.new_foreign_sync(self._master))
         if transaction is not None:
             self.set_transaction(transaction)
------------------------------------------------------------

Changed in aptdaemon (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Phil Weir (phil-weir) wrote :

In case someone tries this fix and gives up without double-checking, I think there may be a typo in #4 patch - missing final paren on inserted line.

Revision history for this message
Krešo Kunjas (deresh) wrote :

@Phil Weir: thanks for noticing, here is an updated patch.

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.