Strange behavior with different locale settings

Mikael Lexén mikael.lexen at spam.no.volvo.com
Mon May 5 10:24:35 EDT 2003


I have found the answer in SpamBayes bug tracking tool

/Mikael

Mikael Lexén wrote:

> Hi
>
> I wanted to try SpamBayes and downloaded the source. Made all
> arrangements and started outlook and got the following in PythonWins
> "Python Trace Collector".
>
> Outlook Spam Addin module loading SpamAddin - Connecting to Outlook
> Traceback (most recent call last):
>   File "C:\Program\Python22\lib\site-packages\win32com\universal.py",
> line 170, in dispatch
>     retVal = ob._InvokeEx_(meth.dispid, 0, meth.invkind, args, None,
> None)
>   File
> "C:\Program\Python22\lib\site-packages\win32com\server\policy.py", line
> 322, in _InvokeEx_
>     return self._invokeex_(dispid, lcid, wFlags, args, kwargs,
> serviceProvider)
>   File
> "C:\Program\Python22\lib\site-packages\win32com\server\policy.py", line
> 601, in _invokeex_
>     return DesignatedWrapPolicy._invokeex_( self, dispid, lcid, wFlags,
> args, kwArgs, serviceProvider)
>   File
> "C:\Program\Python22\lib\site-packages\win32com\server\policy.py", line
> 541, in _invokeex_
>     return apply(func, args)
>   File "F:\downloads\install\spambayes-1.0a2\Outlook2000\addin.py", line
>
> 611, in OnConnection
>     self.manager = manager.GetManager(application)
>   File "F:\downloads\install\spambayes-1.0a2\Outlook2000\manager.py",
> line 335, in GetManager
>     _mgr = BayesManager(outlook=outlook, verbose=verbose)
>   File "F:\downloads\install\spambayes-1.0a2\Outlook2000\manager.py",
> line 79, in __init__
>     import_core_spambayes_stuff(self.ini_filename)
>   File "F:\downloads\install\spambayes-1.0a2\Outlook2000\manager.py",
> line 46, in import_core_spambayes_stuff
>     from spambayes import classifier
>   File "c:\program\python22\Lib\site-packages\spambayes\classifier.py",
> line 40, in ?
>     from spambayes.Options import options
>   File "C:\Program\Python22\lib\site-packages\spambayes\Options.py",
> line 557, in ?
>     options.mergefilelike(d)
>   File "C:\Program\Python22\lib\site-packages\spambayes\Options.py",
> line 517, in mergefilelike
>     self._update()
>   File "C:\Program\Python22\lib\site-packages\spambayes\Options.py",
> line 535, in _update
>     value = getattr(c, fetcher)(section, option)
>   File "c:\program\python22\lib\ConfigParser.py", line 306, in getfloat
>     return self.__get(section, float, option)
>   File "c:\program\python22\lib\ConfigParser.py", line 300, in __get
>     return conv(self.get(section, option))
> exceptions.ValueError: invalid literal for float(): 0.20
>
> I tried  float("0.02") both in PyhtonWin and in a dos-box and every
> thing worked ok
>
>  I changed my locale from Swedish to English an now every thing worked
> as expected
>
> Outlook Spam Addin module loading
> Registered: SpamBayes.OutlookAddin
> Outlook Spam Addin module loading
> SpamAddin - Connecting to Outlook
> Created new configuration file
> 'F:\downloads\install\spambayes-1.0a2\Outlook2000\default_configuration.pck'
>
> Either bayes database or message database is missing - creating new
> Bayes database initialized with 0 spam and 0 good messages SpamAddin -
> Disconnecting from Outlook Bayes database is not dirty - not writing
> Addin terminating: 1 COM client and 2 COM servers exist.
>
> What's wrong?
>
> I'am running WindowsXP,Python 2.2.2 and Win32all build 152
>
> /Mikael








More information about the Python-list mailing list