[Spambayes] locale and ConfigParser

Mark Hammond mhammond at skippinet.com.au
Thu Mar 6 08:35:32 EST 2003


I recently received a mail regarding SpamBayes refusing to work:

> Possible reasons:
>
> Outlook 2002, Dutch version.
...
> File "C:\Python22\lib\ConfigParser.py", line 306, in getfloat
>   return self.__get(section, float, option)
> File "C:\Python22\lib\ConfigParser.py", line 300, in __get
>   return conv(self.get(section, option))
> exceptions.ValueError: invalid literal for float(): 0.20

Addiing the following anywhere before the file is parsed:

> import locale
> locale.setlocale(locale.LC_NUMERIC, "en")

Corrects the problem.  However, it is unclear to me what the ramifications
of this would be.

Anyone have a clue what we should do about this?

Those-bloody-dutch ly,

Mark.




More information about the Spambayes mailing list