[New-bugs-announce] [issue10647] scrollbar crash in non-US locale format settings

Herm Fischer report at bugs.python.org
Tue Dec 7 21:55:34 CET 2010

New submission from Herm Fischer <fischer at markv.com>:

My app has a tkinter messages listbox with a scrollbar which works fine in US setting, but not when locale is a European setting (with comma for decimal point).  It's a highly interactive app with a lot of number formattings in the local locale, and mostly used in Europe and Asia.

This instruction: self.logListBox.insert(END, message)

causes this crash in non-US locale when scrolling down:

Class: class Scrollbar(Widget):

    def set(self, *args):
        """Set the fractional values of the slider position (upper and
        lower ends as value between 0 and 1)."""
        self.tk.call((self._w, 'set') + args)   <<<<===== this line causes exception in European settings

the arg is in European decimal point format, when run on European settings, the error trace is:

  File "C:\Python31\lib\tkinter\__init__.py", line 1399, in __call__
    return self.func(*args)
  File "C:\Python31\lib\tkinter\__init__.py", line 2797, in set
    self.tk.call((self._w, 'set') + args)
_tkinter.TclError: expected floating-point number but got "0,145833"

using python 3.1.3 (r313:86834)

components: Tkinter
messages: 123580
nosy: hfischer
priority: normal
severity: normal
status: open
title: scrollbar crash in non-US locale format settings
type: crash
versions: Python 3.1

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list