software-center crash on load, UnboundLocalError in _get_channels

Bug #606452 reported by Kevin Farley on 2010-07-16
80
This bug affects 15 people
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
Undecided
Unassigned
Lucid
High
Gary Lasker

Bug Description

Binary package hint: software-center

I applied a software-center update today using Update Manager. Ever since then software-center crashes every time I try to run it.

$ software-center
Traceback (most recent call last):
  File "/usr/bin/software-center", line 80, in <module>
    app = SoftwareCenterApp(datadir, xapian_base_path)
  File "/usr/share/software-center/softwarecenter/app.py", line 201, in __init__
    self.view_switcher = ViewSwitcher(datadir, self.db, self.icons)
  File "/usr/share/software-center/softwarecenter/view/viewswitcher.py", line 57, in __init__
    store = ViewSwitcherList(datadir, db, icons)
  File "/usr/share/software-center/softwarecenter/view/viewswitcher.py", line 204, in __init__
    self._update_channel_list()
  File "/usr/share/software-center/softwarecenter/view/viewswitcher.py", line 274, in _update_channel_list
    self.channels = self._get_channels()
  File "/usr/share/software-center/softwarecenter/view/viewswitcher.py", line 352, in _get_channels
    channels.append(partner_channel)
UnboundLocalError: local variable 'partner_channel' referenced before assignment

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: software-center 2.0.6
ProcVersionSignature: Ubuntu 2.6.32-24.38-generic 2.6.32.15+drm33.5
Uname: Linux 2.6.32-24-generic x86_64
Architecture: amd64
Date: Fri Jul 16 15:18:37 2010
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: software-center

Kevin Farley (kfarley) wrote :
Dimitryyy (mr-dsh) wrote :

I have all the same (update and bug), only a kernel another (2.6.34)

rww (rww) wrote :

Confirming this bug in lucid-proposed, and that it's a regression from the current lucid version.

tags: added: regression-proposed
rww (rww) on 2010-07-17
Changed in software-center (Ubuntu):
status: New → Confirmed
Nigel Babu (nigelbabu) wrote :

Thanks for confirming the bug and setting verification failed on SRU bug 604693. Setting to triaged.

Changed in software-center (Ubuntu):
importance: Undecided → High
status: Confirmed → Triaged
Gary Lasker (gary-lasker) wrote :

Thanks very much everyone for taking the time to report this bug and for providing the info we need to fix it. I've linked a branch with a fix for this crash, although I'm not sure at the moment why folks running Lucid are hitting this problem. I can't reproduce this myself unfortunately; I updated my lucid machine to Software Center 2.0.6 from -proposed earlier today and it launches without error.

Changed in software-center (Ubuntu):
assignee: nobody → Gary Lasker (gary-lasker)
Changed in software-center (Ubuntu):
status: Triaged → Fix Committed
John Dong (jdong) wrote :

The patch in the SRU queue looks good, but please add statement of impact, regression potential, and verification procedure info as required by http://wiki.ubuntu.com/StableReleaseUpdates/#Procedure

Other than that, ACK from me. Thanks!

Tom Cornelis (tom-a-l-cornelis) wrote :

I can confirm this patch works for me.

Dimitryyy (mr-dsh) wrote :

I can confirm too, thank you very much Gary.

how do i fix this?

xneon (xneon94) wrote :

Hi everybody i could help in this, for me it did worked fine
first go to synaptic package manager
then search for software center
next mark it and delete it
now search again for software center and mark it and install it again
now its done it should work fine, it did work with me but not sure if it will with you just try
best wishes Xneon

Wiebz (wibiharto) wrote :

@xneon: it didn't work for me.

when you removed software-center, it removed ubuntu-desktop too, so becarefull

Colin Watson (cjwatson) wrote :

According to mvo, this bug never existed in maverick, so marking Invalid there; still open for lucid.

Changed in software-center (Ubuntu Lucid):
assignee: nobody → Gary Lasker (gary-lasker)
importance: Undecided → High
status: New → Fix Committed
Changed in software-center (Ubuntu):
assignee: Gary Lasker (gary-lasker) → nobody
status: Fix Committed → Invalid
importance: High → Undecided
tags: added: verification-needed

Accepted software-center into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Kevin Farley (kfarley) wrote :

The patched software-center update came in this morning. I applied and it works, though with a few failed assertions. I started software-center from command line and just looked through the available apps and clicked on a few more infos. I got the following failed assertions from just browsing apps:

$ software-center
/usr/share/software-center/softwarecenter/apt/aptcache.py:40: GtkWarning: gtk_container_add: assertion `GTK_IS_CONTAINER (container)' failed
  gtk.main_iteration()
/usr/share/software-center/softwarecenter/view/appview.py:185: GtkWarning: gtk_container_add: assertion `GTK_IS_CONTAINER (container)' failed
  gtk.main_iteration()
/usr/share/software-center/softwarecenter/view/appview.py:737: DeprecationWarning: integer argument expected, got float
  h)

Martin Pitt (pitti) on 2010-07-21
tags: added: verification-done
removed: regression-proposed verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-center - 2.0.7

---------------
software-center (2.0.7) lucid-proposed; urgency=low

  * softwarecenter/view/viewswitcher.py:
    - fix crash if partner channel cannot be detected
      (LP: #606452)
 -- Gary Lasker <email address hidden> Sat, 17 Jul 2010 01:35:07 -0400

Changed in software-center (Ubuntu Lucid):
status: Fix Committed → Fix Released
roert trebor (treebor) wrote :
Download full text (7.6 KiB)

re@ylmfos:~$ $ software-center
$: command not found
re@ylmfos:~$ Traceback (most recent call last):
bash: błąd składni przy nieoczekiwanym znaczniku `most'
re@ylmfos:~$ File "/usr/bin/software-center", line 80, in <module>
bash: błąd składni przy nieoczekiwanym znaczniku `newline'
re@ylmfos:~$ app = SoftwareCenterApp(datadir, xapian_base_path)
bash: błąd składni przy nieoczekiwanym znaczniku `('
re@ylmfos:~$ File "/usr/share/software-center/softwarecenter/app.py", line 201, in __init__
No command 'File' found, did you mean:
 Command 'vile' from package 'vile' (universe)
 Command 'zile' from package 'zile' (universe)
 Command 'kile' from package 'kile' (universe)
 Command 'file' from package 'file' (main)
File: command not found
re@ylmfos:~$ self.view_switcher = ViewSwitcher(datadir, self.db, self.icons)bash: błąd składni przy nieoczekiwanym znaczniku `('
re@ylmfos:~$ File "/usr/share/software-center/softwarecenter/view/viewswitcher.py", line 57, in __init__
No command 'File' found, did you mean:
 Command 'vile' from package 'vile' (universe)
 Command 'zile' from package 'zile' (universe)
 Command 'kile' from package 'kile' (universe)
 Command 'file' from package 'file' (main)
File: command not found
re@ylmfos:~$ store = ViewSwitcherList(datadir, db, icons)
bash: błąd składni przy nieoczekiwanym znaczniku `('
re@ylmfos:~$ File "/usr/share/software-center/softwarecenter/view/viewswitcher.py", line 204, in __init__
No command 'File' found, did you mean:
 Command 'vile' from package 'vile' (universe)
 Command 'zile' from package 'zile' (universe)
 Command 'kile' from package 'kile' (universe)
 Command 'file' from package 'file' (main)
File: command not found
re@ylmfos:~$ self._update_channel_list()
> File "/usr/share/software-center/softwarecenter/view/viewswitcher.py", line 274, in _update_channel_list
bash: błąd składni przy nieoczekiwanym znaczniku `File'
re@ylmfos:~$ self.channels = self._get_channels()
bash: błąd składni przy nieoczekiwanym znaczniku `('
re@ylmfos:~$ File "/usr/share/software-center/softwarecenter/view/viewswitcher.py", line 352, in _get_channels
No command 'File' found, did you mean:
 Command 'vile' from package 'vile' (universe)
 Command 'zile' from package 'zile' (universe)
 Command 'kile' from package 'kile' (universe)
 Command 'file' from package 'file' (main)
File: command not found
re@ylmfos:~$ channels.append(partner_channel)
bash: błąd składni przy nieoczekiwanym znaczniku `partner_channel'
re@ylmfos:~$ UnboundLocalError: local variable 'partner_channel' referenced before assignment$ software-center
UnboundLocalError:: command not found
re@ylmfos:~$ Traceback (most recent call last):
bash: błąd składni przy nieoczekiwanym znaczniku `most'
re@ylmfos:~$ File "/usr/bin/software-center", line 80, in <module>
bash: błąd składni przy nieoczekiwanym znaczniku `newline'
re@ylmfos:~$ app = SoftwareCenterApp(datadir, xapian_base_path)
bash: błąd składni przy nieoczekiwanym znaczniku `('
re@ylmfos:~$ File "/usr/share/software-center/softwarecenter/app.py", line 201, in __init__
No command 'File' found, did you mean:
 Command 'vi...

Read more...

Changed in software-center (Ubuntu):
status: Invalid → Fix Committed
status: Fix Committed → Fix Released
assignee: nobody → GAURAV VIMAL (gaurav-vimalbhumca09)
Adolfo Jayme (fitojb) on 2013-09-23
Changed in software-center (Ubuntu):
status: Fix Released → Invalid
assignee: GAURAV VIMAL (gaurav-vimalbhumca09) → nobody
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