update-manager crashed with ImportError in __main__: No module named UpdateManager.UpdateManager

Bug #1013276 reported by Cristian Neacsu
300
This bug affects 62 people
Affects Status Importance Assigned to Milestone
Session Menu
Invalid
Undecided
Unassigned
update-manager (Ubuntu)
Confirmed
High
Unassigned

Bug Description

update-manager crashed with ImportError in __main__: No module named UpdateManager.UpdateManager

ProblemType: Crash
DistroRelease: Ubuntu 12.10
Package: update-manager 1:0.163
Uname: Linux 3.5.0-030500rc2-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.2.2-0ubuntu2
Architecture: amd64
CrashCounter: 1
Date: Thu Jun 14 19:57:53 2012
ExecutablePath: /usr/bin/update-manager
GsettingsChanges:
 b'com.ubuntu.update-manager' b'first-run' b'false'
 b'com.ubuntu.update-manager' b'launch-time' b'1339692919'
 b'com.ubuntu.update-manager' b'show-details' b'true'
 b'com.ubuntu.update-manager' b'window-height' b'325'
 b'com.ubuntu.update-manager' b'window-width' b'640'
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Alpha amd64 (20120609.1)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/update-manager
ProcEnviron:
 PATH=(custom, no user)
 LANG=ro_RO.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/bin/update-manager']
SourcePackage: update-manager
Title: update-manager crashed with ImportError in __main__: No module named UpdateManager.UpdateManager
Traceback:
 Traceback (most recent call last):
   File "/usr/bin/update-manager", line 35, in <module>
     from UpdateManager.UpdateManager import UpdateManager
 ImportError: No module named UpdateManager.UpdateManager
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Revision history for this message
Cristian Neacsu (cristian.ncs) wrote :
tags: removed: need-duplicate-check
visibility: private → public
Changed in update-manager (Ubuntu):
importance: Undecided → High
Barry Warsaw (barry)
Changed in update-manager (Ubuntu):
assignee: nobody → Barry Warsaw (barry)
milestone: none → quantal-alpha-2
Revision history for this message
Colin Watson (cjwatson) wrote :

 ProcCmdline: /usr/bin/python /usr/bin/update-manager

Something is incorrectly invoking update-manager with Python 2, but it's been ported to Python 3. Do you know how update-manager was started here? Was it from some other program, or manually, or what?

Changed in update-manager (Ubuntu):
status: New → Incomplete
Revision history for this message
Barry Warsaw (barry) wrote :

Just to complete the circle, this probably happens because the UpdateManager module is now only installed in the Python 3 sys.path, so when invoked with Python 2, the module isn't found.

Does it make sense to crash with a more useful message? E.g. we could put a sys.version test at the top of update-manager and complain loudly if it wasn't invoked with Python 3. OTOH, maybe this is good enough.

Yes, the bug is not in Update Manager, but in whatever is invoking u-m with the Python 2 command line.

Changed in update-manager (Ubuntu):
milestone: quantal-alpha-2 → quantal-alpha-3
Revision history for this message
Al Duarte (alduarteheroi) wrote :

ele não deixa atualizar o sistema

Changed in update-manager (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Rainer Rohde (rainer-rohde) wrote :

This happened to me just now as well, right after an dist-upgrade that also seems to have change the updater's config file.

Revision history for this message
Al Duarte (alduarteheroi) wrote :

toda vez que uso "software atualizado" o bug trava tudo.

Revision history for this message
Al Duarte (alduarteheroi) wrote :

ataca toda vez que tento atualizar.

Changed in update-manager (Ubuntu):
assignee: Barry Warsaw (barry) → Al Duarte (alduarteheroi)
Revision history for this message
Mark Kelley (mcellius) wrote :

When I try to run Software Updater from the Software Up To Date menu item (under the gear wheel), I get no errors but the Software Updater just doesn't open. When I tried to run it from the command line (update-manager) I get the error message shown. The problem persists after upgrading the 3.5.0-3-generic kernel to 3.5.0-4-generic.

Revision history for this message
Stephen Cradock (s-cradock) wrote :

I get the same bug; I can confirm that issuing the command "/usr/bin/python3 /usr/bin/update-manager" in a terminal starts UpdateManager without error.

Revision history for this message
Stephen Cradock (s-cradock) wrote :

The file /usr/bin/update-manager is a text file whose first line reads "#!/usr/bin/python"

Could the fix be as simple as appending the character 3 to this string?

Yes - that fixes it.

Revision history for this message
Karma Dorje (taaroa) wrote :

confirm this.
this (fix shebang) fixes it. as workaround or complete fix.

Revision history for this message
mscout2004 (mscout2004) wrote :

Stephen is right just adding the 3 to the end of the first line in that file corrects the problem with the update-manager crashing.

Revision history for this message
mscout2004 (mscout2004) wrote :

Adding "3" to the end of the first line of code does seem to be a complete fix to this problem.

Revision history for this message
Emanuele Sottocorno (sotema) wrote :

For me too adding the 3 fixes the problem

Revision history for this message
Hendrik Schrieber (hennekn) wrote :

This happens to me when starting update manager from system menu (top right corner of Unity's menu bar).

Revision history for this message
Joluca (luiz-joluca42) wrote :

This happens to me when starting update manager from system menu (top right corner of Unity's menu bar).

Changed in update-manager (Ubuntu):
assignee: Al Duarte (alduarteheroi) → Barry Warsaw (barry)
Revision history for this message
Sebastien Bacher (seb128) wrote :

the recent comments are a recent regression and should probably be tracked in a new bug

Revision history for this message
Sebastien Bacher (seb128) wrote :

the new issue is bug #1023474 and a fix just got uploaded

Changed in update-manager (Ubuntu):
assignee: Barry Warsaw (barry) → nobody
milestone: quantal-alpha-3 → none
Changed in indicator-session:
status: New → Invalid
Revision history for this message
col reilly (lupinehorror) wrote :

chose 'show updates' from the task bar icon (xubuntu) and crash happened. when i selected 'install updates' things proceeded correctly.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

It seems that the error is gone with the fix for bug 1023474.

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.