Comment 2 for bug 602152

Revision history for this message
C de-Avillez (hggdh2) wrote : Re: Ubuntu Software Center fails and swallows error message

I did the same wget as noted by the OP. One thing should be noted here: 'sudo wget ... -O...' will create a file respecting the UMASK. It happens mine is the default (022), so I did not experience this issue. I then forcefully changed permissions:

sudo chmod 640 /etc/apd/source.list.d/playonlinux.list

And then was able to reproduce:

cerdea@xango2:/src/buildd/arsenal/scripts$ software-center
** Message: pygobject_register_sinkfunc is deprecated (GtkWindow)
** Message: pygobject_register_sinkfunc is deprecated (GtkInvisible)
** Message: pygobject_register_sinkfunc is deprecated (GtkObject)
/usr/share/software-center/softwarecenter/view/historypane.py:30: DeprecationWarning: please use 'debian' instead of 'debian_bundle'
  from debian_bundle import deb822
Traceback (most recent call last):
  File "/usr/share/software-center/softwarecenter/apt/aptcache.py", line 94, in open
    self._cache = apt.Cache(GtkMainIterationProgress())
  File "/usr/lib/python2.6/dist-packages/apt/cache.py", line 86, in __init__
    self.open(progress)
  File "/usr/lib/python2.6/dist-packages/apt/cache.py", line 123, in open
    self._cache = apt_pkg.Cache(progress)
SystemError: E:Opening /etc/apt/sources.list.d/playonlinux.list - ifstream::ifstream (13: Permission denied), E:The list of sources could not be read.
Traceback (most recent call last):
  File "/usr/bin/software-center", line 83, in <module>
    app = SoftwareCenterApp(datadir, xapian_base_path, enable_lp_integration=options.enable_lp)
  File "/usr/share/software-center/softwarecenter/app.py", line 243, in __init__
    self.view_switcher = ViewSwitcher(datadir, self.db, self.cache, self.icons)
  File "/usr/share/software-center/softwarecenter/view/viewswitcher.py", line 57, in __init__
    store = ViewSwitcherList(datadir, db, cache, icons)
  File "/usr/share/software-center/softwarecenter/view/viewswitcher.py", line 231, in __init__
    self._update_channel_list()
  File "/usr/share/software-center/softwarecenter/view/viewswitcher.py", line 296, in _update_channel_list
    self._update_channel_list_installed_view()
  File "/usr/share/software-center/softwarecenter/view/viewswitcher.py", line 344, in _update_channel_list_installed_view
    if (pkgname in self.cache and
  File "/usr/share/software-center/softwarecenter/apt/aptcache.py", line 106, in __contains__
    return self._cache.__contains__(k)
AttributeError: 'NoneType' object has no attribute '__contains__'

Confirming for Maverick.