Gdk.color_parse error in oneiric

Bug #839675 reported by Javier Collado
40
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Checkbox
Fix Released
Critical
Daniel Manrique

Bug Description

checkbox-gtk fails to launch in oneiric with the following traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/checkbox/reactor.py", line 74, in fire
    results.append(handler(*args, **kwargs))
  File "/usr/share/checkbox/plugins/user_interface.py", line 54, in run
    interface = interface_class(self.title, self.data_path)
  File "/usr/lib/python2.7/dist-packages/checkbox_gtk/gtk_interface.py", line 83, in __init__
    color = Gdk.color_parse("#F0EBE2")[1]
TypeError: 'Color' object does not support indexing

After some investigation, it turns out that in natty the output of such a command is:
(True, <Gdk.Color(red=61680, green=60395, blue=58082)>)

while in oneiric is:
<Gdk.Color(red=61680, green=60395, blue=58082)>

Hence, to fix the problem in oneiric the following line:
    color = Gdk.color_parse("#F0EBE2")[1]

has to be replaced with:
    color = Gdk.color_parse("#F0EBE2")

Related branches

Revision history for this message
Javier Collado (javier.collado) wrote :
summary: - Gdk.color_parse
+ Gdk.color_parse error in oneiric
description: updated
Revision history for this message
Daniel Manrique (roadmr) wrote :

Marking as confirmed due to bug 840376, and importance: Critical, since checkbox doesn't start at all and being able to test the system is something a lot of Ubuntu users will want to do.

Changed in checkbox:
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
Daniel Manrique (roadmr) wrote :

This is caused by an API-breaking change in PyGTK:

https://bugzilla.gnome.org/show_bug.cgi?id=653462

"
Change Gdk.color_parse() to not return a tuple, instead just
return the created color or None if it wasn't possible to parse
the name into a color.

This keeps compatibility with PyGTK but breaks the current API.

"

Revision history for this message
Daniel Manrique (roadmr) wrote :

See bug 842235 for a report on the underlying PyGTK problem, maybe not to be solved, but to warn others about this problem.

Revision history for this message
Lei Wang (raywang) wrote :

Hi Daniel, I maybe a little confused, so what's the solution to this bug?
Shall I upgrade checkbox to a new version which should be built against with new pygtk or something?

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Ray,

Apologies, I realize everything thus far has been just technical discussion.

A fix has already been submitted for checkbox and is awaiting review and publishing to Oneiric. As a subscriber to this bug report you will be notified when the fix moves to Fix Committed and Fix Released. I expect that checkbox 0.12.6 will be available as an update for Oneiric in a couple of days.

If you care to look at the updated code, it's available here:

https://code.launchpad.net/checkbox

Revision 1027 contains the specific fix for this problem.

Changed in checkbox:
status: Confirmed → Triaged
status: Triaged → In Progress
assignee: nobody → Daniel Manrique (roadmr)
milestone: none → 0.12.6
Revision history for this message
Lei Wang (raywang) wrote :

Hi Daniel,

It's great to see this is going to be fixed, thanks for the updates. :-)

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

Please see https://bugs.launchpad.net/ubuntu/+source/pygobject/+bug/842235/comments/1, this can't/won't be fixed in pygobject.

Revision history for this message
Daniel Manrique (roadmr) wrote :

This is fixed in checkbox 0.12.6. Marking Fix Released.

Changed in checkbox:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.