[Spambayes] BUG: Input from LOCALE not used

Biot Olivier Olivier.Biot at siemens.com
Fri Apr 18 15:50:42 EDT 2003


Hi all,
 
I finally found the reason why the SpamBayes plugin was not loading: I have
a Belgian locale with a comma as decimal separator. As a result, a float
should be written as "0,10" instead of "0.10" and as a result the SpamBayes
plugin crashed on reading the dictionary (I think).
 
I now have to change my default LOCALE settings in Windows in order to get
the plugin to work. Could it be possible to update this so SpamBayes will
work for all LOCALE settings?
 
Regards,
 
Olivier BIOT
 
PS: Backtrace of the unsuccessful plugin loading:
 
# This window will display output from any programs that import
win32traceutil
# win32com servers registered with '--debug' are in this category.
Outlook Spam Addin module loading
SpamAddin - Connecting to Outlook
Created new configuration file
'D:\spambayes-1.0a2\Outlook2000\default_configuration.pck'
Traceback (most recent call last):
  File "C:\Python23\lib\site-packages\win32com\universal.py", line 170, in
dispatch
    retVal = ob._InvokeEx_(meth.dispid, 0, meth.invkind, args, None, None)
  File "C:\Python23\lib\site-packages\win32com\server\policy.py", line 322,
in _InvokeEx_
    return self._invokeex_(dispid, lcid, wFlags, args, kwargs,
serviceProvider)
  File "C:\Python23\lib\site-packages\win32com\server\policy.py", line 601,
in _invokeex_
    return DesignatedWrapPolicy._invokeex_( self, dispid, lcid, wFlags,
args, kwArgs, serviceProvider)
  File "C:\Python23\lib\site-packages\win32com\server\policy.py", line 541,
in _invokeex_
    return apply(func, args)
  File "D:\spambayes-1.0a2\Outlook2000\addin.py", line 611, in OnConnection
    self.manager = manager.GetManager(application)
  File "D:\spambayes-1.0a2\Outlook2000\manager.py", line 335, in GetManager
    _mgr = BayesManager(outlook=outlook, verbose=verbose)
  File "D:\spambayes-1.0a2\Outlook2000\manager.py", line 79, in __init__
    import_core_spambayes_stuff(self.ini_filename)
  File "D:\spambayes-1.0a2\Outlook2000\manager.py", line 46, in
import_core_spambayes_stuff
    from spambayes import classifier
  File "C:\Python23\Lib\site-packages\spambayes\classifier.py", line 40, in
?
    from spambayes.Options import options
  File "C:\Python23\Lib\site-packages\spambayes\Options.py", line 557, in ?
    options.mergefilelike(d)
  File "C:\Python23\Lib\site-packages\spambayes\Options.py", line 517, in
mergefilelike
    self._update()
  File "C:\Python23\Lib\site-packages\spambayes\Options.py", line 535, in
_update
    value = getattr(c, fetcher)(section, option)
  File "C:\Python23\lib\ConfigParser.py", line 318, in getfloat
    return self._get(section, float, option)
  File "C:\Python23\lib\ConfigParser.py", line 312, in _get
    return conv(self.get(section, option))
exceptions.ValueError: invalid literal for float(): 0.20


More information about the Spambayes mailing list