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

Bug #905602 reported by Martin Albisetti
134
This bug affects 24 people
Affects Status Importance Assigned to Milestone
pygobject (Ubuntu)
Fix Released
High
Martin Pitt
Precise
Fix Released
High
Martin Pitt

Bug Description

Tried to set the apt mirrir to "other".

TEST CASE:
1. Launch software-properties-gtk from a console
2. Switch to first tab 'Ubuntu Software' if not already selected
3. On the combobox 'Download from' select 'Other ...'

ACTUAL RESULT:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 477, in on_combobox_server_changed
    uri = server_store.get_value(iter, 1)
  File "/usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py", line 977, in get_value
    return self._decode_value(treeiter, column, value)
  File "/usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py", line 803, in _decode_value
    value = value.decode('UTF-8')
AttributeError: 'NoneType' object has no attribute 'decode'

EXPECTED RESULT
The user can proceed with the selection of another mirror.

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: software-properties-gtk 0.82
ProcVersionSignature: Ubuntu 3.2.0-5.11-generic 3.2.0-rc5
Uname: Linux 3.2.0-5-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 1.90-0ubuntu1
Architecture: amd64
Date: Sat Dec 17 00:02:57 2011
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/software-properties-gtk
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20111216.1)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/software-properties-gtk -n -t 0
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/bin/software-properties-gtk', '-n', '-t', '0']
SourcePackage: software-properties
Title: software-properties-gtk crashed with AttributeError in _decode_value(): 'NoneType' object has no attribute 'decode'
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Revision history for this message
Martin Albisetti (beuno) wrote :
tags: removed: need-duplicate-check
visibility: private → public
Revision history for this message
Brian Murray (brian-murray) wrote :

I was able to recreate this using the same steps.

Changed in software-properties (Ubuntu):
assignee: nobody → Canonical Foundations Team (canonical-foundations)
importance: Undecided → High
status: New → Triaged
Revision history for this message
Britt Yazel (bwyazel) wrote :

I am also experiencing this issue. I can only choose between the "main" server or the "Canadian" server. Any attempts to change the server to "other" results in a crash

tags: added: rls-mgr-p-tracking
description: updated
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

same trace with software-center bug 905605

Revision history for this message
Brian Smith (brian-smith-i) wrote :

Cannot change to 'other'
I need software from French server

Revision history for this message
Martin Pitt (pitti) wrote :
affects: software-properties (Ubuntu Precise) → pygobject (Ubuntu Precise)
Changed in pygobject (Ubuntu Precise):
assignee: Canonical Foundations Team (canonical-foundations) → Martin Pitt (pitti)
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pygobject - 3.0.3-2

---------------
pygobject (3.0.3-2) unstable; urgency=medium

  * Urgency medium as the previous release with the regression already made it
    into testing and is causing quite a few unexpected breakages.
  * Add 01_revert_tree_model_unicode_conversion.patch: Revert "Convert all
    strings to utf-8 encoding when retrieving from TreeModel" change from
    previous release. This changes existing behaviour (model values being str
    instead of unicode) and also makes tree model behaviour incompatible to
    the rest of Gtk behaviour (which always returns UTF-8 encoded str objects,
    not unicode). The original bug description was a bug in the test case
    code, you cannot mix str and unicode objects in interpolation.
    (LP: #905602)
 -- Martin Pitt <email address hidden> Fri, 06 Jan 2012 16:38:51 +0100

Changed in pygobject (Ubuntu Precise):
status: In Progress → Fix Released
Revision history for this message
JG (jdogzz-g5) wrote :

This hasn't been fixed. I just got the error right now and my computer has been up to date since the day the fix was released.

Revision history for this message
Martin Pitt (pitti) wrote :

Works fine here. JG, please give me the output of

  dpkg -l python-gobject

and a recipe how to reproduce this, and the full output of the program from a terminal (i. e. the stack trace).

Thanks!

Revision history for this message
Sam_ (and-sam) wrote :

Happened twice here. Call software-properties via alt+f2, view updates tab, close the GUI. Apport reports a crash, collects info and leads me to an already existing bug 911834 which is a dupe of this one.
~$ apt-cache policy python-gobject
python-gobject:
  Installed: 3.0.3-2
  Candidate: 3.0.3-2
  Version table:
 *** 3.0.3-2 0
        500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Sam_ (and-sam) wrote :

Not reproducable, happens rather randomly, tested a third time after the crash and fourth, fifth time after reboot. Terminal output only says trust-db generated.

Revision history for this message
Sam_ (and-sam) wrote :

Just happened again after the app was closed and leads to dupe 911834. Since software-properties isn't opened daily by the user there is no daily report, but it certainly still crashes on two different machines after having it the first time open and then closing it.
Traceback:
 Traceback (most recent call last):
   File "/usr/lib/python2.7/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 820, in on_treeview_sources_cursor_changed
     (model, iter) = sel.get_selected()
 AttributeError: 'NoneType' object has no attribute 'get_selected'

python-gobject:
  Installed: 3.1.1-0ubuntu1
  Candidate: 3.1.1-0ubuntu1
  Version table:
 *** 3.1.1-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status

Dependencies in crash file say:
python-gobject 3.1.1-0ubuntu1
python-gobject-2 2.28.6-9

## Besides there is still the odd behaviour that it requests authentication on one of two machines although the versions are the same. bug 930972

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

Just experienced this, edit the software sources,other software, close - app crashed
 apt-cache policy python-gobject
python-gobject:
  Installed: 3.1.1-0ubuntu1
  Candidate: 3.1.1-0ubuntu1

Revision history for this message
Sam_ (and-sam) wrote :

Traceback dito #12 on laptop. This time open via Synaptic -> software sources, closing it results in a crash.

Revision history for this message
Ayke (ayke) wrote :

I didn't change anything in software-sources and when I closed the window this bug hit me.
That was when opening it from update-manager after installing updates.

Revision history for this message
Alex Mayorga (alex-mayorga) wrote :

Definitely not fixed.
I got routed to bug 911834 after I experienced this crash.

alex-mayorga@VPCCW1FFXL:~$ apt-cache policy python-gobject
python-gobject:
  Installed: 3.1.1-0ubuntu1
  Candidate: 3.1.1-0ubuntu1
  Version table:
 *** 3.1.1-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status

Happens randomly but these were the steps to reproduce:
Open "Software Sources"
Select "Other Software" tab
Select an unselected PPA
Unselect the previously selected PPA
Click "Close"

Revision history for this message
Martin Pitt (pitti) wrote :

I tried the recipe in the previous comment several times, with variations, and I cannot get it to crash here. (Also amd64).

Revision history for this message
Martin Pitt (pitti) wrote :

If you can still reproduce it, can you please file a new bug? This will give me an updated stack trace and dependency information. Thanks!

Revision history for this message
Sam_ (and-sam) wrote :

Martin, I'm unable to file a new bug because apport always leads to dupe bug 911834, which is mentioned in the report. I'll try to upload the report manually.

Revision history for this message
Sam_ (and-sam) wrote :

Attach the .crash file manually. Add video where the bug is reproduced incl. apport trace back. I could reproduce the bug by running software-properties via dash, clicking on all tabs back and forth, close per window button, wait 2-3 sec. until apport reports the crash.

Revision history for this message
Sam_ (and-sam) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Thanks Sam_! This is actually a very different stack trace than this bug, so bug 911834 was duplicated wrongly. I unduplicated it now, and will follow up there.

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.