update-manager crashed with NameError in update_count(): global name 'glib' is not defined

Bug #807518 reported by angel orna on 2011-07-08
358
This bug affects 78 people
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
High
Michael Vogt
Oneiric
High
Michael Vogt

Bug Description

Update-manager crashes on startup.

Traceback (most recent call last):
  File "/usr/bin/update-manager", line 109, in <module>
    app.main(options)
  File "/usr/lib/python2.7/dist-packages/UpdateManager/UpdateManager.py", line 1223, in main
    self.fillstore()
  File "/usr/lib/python2.7/dist-packages/UpdateManager/UpdateManager.py", line 1078, in fillstore
    self.update_count()
  File "/usr/lib/python2.7/dist-packages/UpdateManager/UpdateManager.py", line 674, in update_count
    glib.timeout_add_seconds(10, self.update_last_updated_text)
NameError: global name 'glib' is not defined

ProblemType: Crash
DistroRelease: Ubuntu 11.10
Package: update-manager 1:0.152
ProcVersionSignature: Ubuntu 3.0-3.4-generic 3.0.0-rc5
Uname: Linux 3.0-3-generic i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Fri Jul 8 14:53:09 2011
ExecutablePath: /usr/bin/update-manager
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python2.7 /usr/bin/update-manager
ProcEnviron:
 LANGUAGE=es:en_GB:en
 LANG=es_ES.UTF-8
 LC_MESSAGES=es_ES.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/bin/update-manager']
SourcePackage: update-manager
Title: update-manager crashed with NameError in update_count(): global name 'glib' is not defined
UpgradeStatus: Upgraded to oneiric on 2011-05-26 (42 days ago)
UserGroups: adm admin audio cdrom dialout dip fax floppy fuse lpadmin netdev plugdev sambashare tape video

angel orna (angelorna) wrote :
angel orna (angelorna) on 2011-07-08
visibility: private → public
Smithie (matthys-moore) wrote :

Same problem

Steve Sheldon (stephen-sheldon) wrote :

Exactly same issue after running partial upgrade (have been updating nightly with update manager

GNAServicesInc (gnaservicesinc) wrote :

Me as well, Exactly same issue after running partial upgrade. Strace says

Changed in update-manager (Ubuntu):
status: New → Confirmed
Jean-Baptiste Lallement (jibel) wrote :

Thanks for your report. Confirmed on an up to date Oneiric.

Changed in update-manager (Ubuntu):
assignee: nobody → Canonical Foundations Team (canonical-foundations)
importance: Undecided → High
status: Confirmed → Triaged
description: updated

you can fix this by adding this to /usr/lib/python2.7/dist-packages/UpdateManager/UpdateManager.py :

import glib

MikhailValerie (mikhailvalerie) wrote :

I had this issue after running a partial upgrade for Oneiric, but I can confirm that Joaquin's fix (see #6) worked for me.

GNAServicesInc (gnaservicesinc) wrote :

So it's that simple, something like

Alessandro Losavio (alo21) wrote :

I have the same problem in Ubuntu 11.10 amd64

Colin Watson (cjwatson) on 2011-07-09
Changed in update-manager (Ubuntu Oneiric):
assignee: Canonical Foundations Team (canonical-foundations) → Michael Vogt (mvo)
milestone: none → oneiric-alpha-3
Peter Golden (peter-golden) wrote :

import glib worked for me to thank you

tags: added: patch
Marc Ozbby (smogllb) wrote :

How can I add the glib import...most of us are noobs in here and so would like and appreciate a detailed process as to how to go about adding the 'import glib' as above. thanks

Timo Reimerdes (timorei) wrote :

Marc Ozbby, to add the import glib entry you have to:

sudo gedit /usr/lib/python2.7/dist-packages/UpdateManager/UpdateManager.py

and then write in there - in one free line (like line 37 - thats where I put it)
import glib

save and close. And you are done.

the reported fix works for me too.

Marc Ozbby (smogllb) wrote :

Thanks Timo for taking the time to explain this to me.. I have added it successfully and I hope it does not report the same problem. Ubuntu

angel orna (angelorna) wrote :

New update-manager 1:0.152.1 seems to fix this problem.

update-manager (1:0.152.1) oneiric; urgency=low

  * fix release upgrade view dialog in gtk3
  * UpdateManager/UpdateManager.py, check-new-release-gtk:
    - use GLib.timeout_add(priority, timeout, func, data) instead
      of the old glib.timeout_add()
      thanks to Michael Terry (lp:~mterry/update-manager/pygi-cleanups)
  * check-new-release-gtk, tests/test_end_of_life.py:
    - fix test failures

Changed in update-manager (Ubuntu Oneiric):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Patches