software-properties-gtk crashed with AttributeError in remove_source(): 'NoneType' object has no attribute 'file'

Bug #820150 reported by otto888 on 2011-08-03
This bug affects 57 people
Affects Status Importance Assigned to Milestone
software-properties (Ubuntu)
Martin Pitt

Bug Description

I was trying to remove a repository.

ProblemType: Crash
DistroRelease: Ubuntu 11.10
Package: software-properties-gtk 0.81.4
ProcVersionSignature: Ubuntu 3.0.0-7.9-generic 3.0.0
Uname: Linux 3.0.0-7-generic x86_64
Architecture: amd64
Date: Tue Aug 2 21:08:28 2011
ExecutablePath: /usr/bin/software-properties-gtk
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha amd64 (20110705.1)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/software-properties-gtk -n -t 62914689
 PATH=(custom, no user)
PythonArgs: ['/usr/bin/software-properties-gtk', '-n', '-t', '62914689']
SourcePackage: software-properties
Title: software-properties-gtk crashed with AttributeError in remove_source(): 'NoneType' object has no attribute 'file'
UpgradeStatus: Upgraded to oneiric on 2011-08-03 (0 days ago)

otto888 (otto888) wrote :
tags: removed: need-duplicate-check
Changed in software-properties (Ubuntu):
status: New → Confirmed
tags: added: bugpattern-needed
Changed in software-properties (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
visibility: private → public
tags: removed: bugpattern-needed
tags: added: bugpattern-written
Samuel Dorsaz (akira86) wrote :

I don't have bug trace now, but I simply add this repository at first with this command :
sudo add-apt-repository ppa:team-xbmc/unstable

And crash appear when you use ubuntu software center and source manager application to remove this respository. The other way to remove it is to remove file in /etc/apt/source.list.d/

Gunnar Wegner (gunnar-wegner) wrote :

I confirm what Samuel says.

I (accidentially) wanted to remove a repository while, in a terminal, i had "sudo apt-get update" running, and the source manager crashed.

Richard Ayotte (rich-ayotte) wrote :

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/softwareproperties/gtk/", line 839, in on_remove_clicked
  File "/usr/lib/python2.7/dist-packages/dbus/", line 143, in __call__
  File "/usr/lib/python2.7/dist-packages/dbus/", line 630, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.AttributeError: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/dbus/", line 702, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python2.7/dist-packages/softwareproperties/dbus/", line 269, in RemoveSource
  File "/usr/lib/python2.7/dist-packages/softwareproperties/", line 711, in remove_source
    if source.file != apt_pkg.config.find_file("Dir::Etc::sourcelist"):
AttributeError: 'NoneType' object has no attribute 'file'

Martin Pitt (pitti) on 2012-03-07
Changed in software-properties (Ubuntu):
status: Triaged → Fix Committed
assignee: nobody → Martin Pitt (pitti)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-properties - 0.82.5

software-properties (0.82.5) precise; urgency=low

  * softwareproperties/gtk/ Drop duplicate definition
    of on_treeview_sources_cursor_changed().
  * softwareproperties/gtk/ Fix crash when closing
    the application with the window title bar button. (LP: #911834)
  * add-apt-repository: Intercept ValueError in addition to URLError, as this
    is the error thrown when trying to decode invalid JSON (which happens on
    404 pages etc.). (LP: #861258)
  * softwareproperties/, _find_source_from_string():
    Reload the sources list before searching, as it might have changed while
    the D-BUS backend was running. (LP: #854818, #820150)
  * softwareproperties/gtk/ Add missing argument to
    menu popup() call. (LP: #815236)
 -- Martin Pitt <email address hidden> Wed, 07 Mar 2012 10:14:52 +0100

Changed in software-properties (Ubuntu):
status: Fix Committed → Fix Released
JG (jdogzz-g5) wrote :

I just got this error on a fully upgraded system so this bug hasn't been fixed yet.

Sasa Paporovic (melchiaros) wrote :

I am too.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers