fractional font sizes prevent gwibber starting

Bug #402116 reported by Chris Jones
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Gwibber
New
Undecided
Unassigned
gwibber (Debian)
Fix Released
Unknown
gwibber (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: gwibber

My appearance settings in Karmic are to use Droid Sans as the Application Font at a size of 6.5pt, which is perfectly legitimate.
Gwibber does the following:

    self.settings.set_property("default-font-size", (int(fsize) + 2))

which seems cause it to fail to start with fsize being a float (see attached traceback)

ProblemType: Crash
Architecture: amd64
Date: Tue Jul 21 09:28:33 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/gwibber
InterpreterPath: /usr/bin/python2.6
Package: gwibber 1.2.0~bzr346-0ubuntu2
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/gwibber
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_GB.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-3.19-generic
PythonArgs: ['/usr/bin/gwibber']
SourcePackage: gwibber
Title: gwibber crashed with ValueError in load_theme()
Uname: Linux 2.6.31-3-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Related branches

Revision history for this message
Chris Jones (cmsj) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Chris Jones (cmsj) wrote :

The problem would be that python can't turn a string of "6.5" into an integer via int(). However, this works:

>>> num1 = "6.5"
>>> num2 = "6"
>>> int(float(num1))
6
>>> int(float(num2))
6
>>>

It would seem like it might be nicer in the long run to support floats for font sizes, but in the mean time the additional float() call should fix this crash.

Revision history for this message
Chris Jones (cmsj) wrote :
visibility: private → public
Revision history for this message
Chris Jones (cmsj) wrote :

Also linking with a branch to fix this upstream in case that's preferable to a debdiff

Revision history for this message
Abhishek Mishra (ideamonk) wrote :

I got the same problem on gwibber-1.2.0~bzr354
I've set my Application font size as 9.6 , I think rounding off would be more appropriate as 9.6 is more closer to 10 than to 9.

In gwibber/gwui.py

76 self.settings.set_property("default-font-size", (int(fsize) + 2))

can be changed to

76 self.settings.set_property("default-font-size", (int(round( float(fsize) ) + 2) + 2))

Changed in gwibber (Debian):
status: Unknown → New
Revision history for this message
Nicolas Maître (nmaitre) wrote :

I think this bug is a duplicate of #383759.
Tagging as such.

Changed in gwibber (Debian):
status: New → Fix Released
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.