Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

python-gnome: float weirdness with gnome.ui is back

0 views
Skip to first unread message

Chris Lawrence

unread,
Jan 17, 2002, 11:14:00 AM1/17/02
to
reassign 119951 python-gnome, routeplanner-gnome
retitle 119951 python-gnome: float() works incorrectly after import gnome.ui
thanks

On Nov 17, Sebastian Rittau wrote:
> Package: routeplanner-gnome
> Version: 0.12
> Severity: important
>
> After starting the Gnome routeplanner frontend and trying to open
> /usr/share/routeplanner/Basic-USA.rpl3.gz I get the following stack
> trace on the console:
>
> srittau@jroger:~$ grplan
> Traceback (most recent call last):
[...]
> File "/usr/share/routeplanner/rpcity.py", line 36, in __init__
> self.longitude = float(data[2])
> ValueError: invalid literal for float(): 0.000
>
> The "Loading Cities" requester then hangs a 0%.

I've done some more tracking. Here's the interesting result:

$ LANG=de_DE@euro rpcli NorthAmerica.rpl3
* This works

$ LANG=de_DE@euro grplan NorthAmerica.rpl3
* This doesn't work

The reason:

"from gnome.ui import *" does something nasty to the locale settings
that stops float() from working. Python's float builtin (like int) is
supposed to work in the C locale all of the time; even if you do
locale.setlocale(LC_ALL, "") in a program, the only things that are
affected are in the locale module itself. Even doing "import gnome.ui"
triggers the bug.

I don't know what exactly is going on, but it's probably something in
python-gnome. I'm passing this along to its maintainer.

(Torsten: I suspect the fix for #59713 got rolled back somewhere along
the line, or something similar is going on elsewhere in the code.)


Chris
--
Chris Lawrence <cnla...@olemiss.edu> - http://www.lordsutch.com/chris/

Instructor and Ph.D. Candidate, Political Science, Univ. of Mississippi
208 Deupree Hall - 662-915-5765


--
To UNSUBSCRIBE, email to debian-pyt...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Torsten Landschoff

unread,
Jan 17, 2002, 1:09:02 PM1/17/02
to
On Thu, Jan 17, 2002 at 10:11:11AM -0600, Chris Lawrence wrote:
> I don't know what exactly is going on, but it's probably something in
> python-gnome. I'm passing this along to its maintainer.
>
> (Torsten: I suspect the fix for #59713 got rolled back somewhere along
> the line, or something similar is going on elsewhere in the code.)

Maybe. I have to check... Time to add a regression test to the package.

cu
Torsten

0 new messages