[Spambayes] [ spambayes-Bugs-725466 ] Include a proper locale fix
in Options.py
SourceForge.net
noreply at sourceforge.net
Tue May 6 08:18:40 EDT 2003
Bugs item #725466, was opened at 2003-04-22 08:07
Message generated for change (Comment added) made by sgruendel
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=725466&group_id=61702
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Tony Meyer (anadelonbrin)
Assigned to: Tony Meyer (anadelonbrin)
Summary: Include a proper locale fix in Options.py
Initial Comment:
When reading the options, the float() call fails when the
locale is a language that uses a ',' for a separator
instead of '.'. This is hack-fixed in Outlook, but needs to
be fixed in general.
I imagine that there must be some sort of locale call that
will convert between the current locale and English, and
that this should be called as the option is set.
Anyway, I'll get to this when I can.
----------------------------------------------------------------------
Comment By: Stefan Gründel (sgruendel)
Date: 2003-05-06 16:18
Message:
Logged In: YES
user_id=671479
It seems like it's not enough to fix Options.py only. I did this
and then got the following error:
Traceback (most recent call last):
File "D:\dev\Python22\lib\site-
packages\win32com\universal.py", line 170, in dispatch
retVal = ob._InvokeEx_(meth.dispid, 0, meth.invkind, args,
None, None)
File "D:\dev\Python22\lib\site-
packages\win32com\server\policy.py", line 322, in _InvokeEx_
return self._invokeex_(dispid, lcid, wFlags, args, kwargs,
serviceProvider)
File "D:\dev\Python22\lib\site-
packages\win32com\server\policy.py", line 601, in _invokeex_
return DesignatedWrapPolicy._invokeex_( self, dispid, lcid,
wFlags, args, kwArgs, serviceProvider)
File "D:\dev\Python22\lib\site-
packages\win32com\server\policy.py", line 541, in _invokeex_
return apply(func, args)
File "D:\util\spambayes-1.0a2\Outlook2000\addin.py", line
611, in OnConnection
self.manager = manager.GetManager(application)
File "D:\util\spambayes-1.0a2\Outlook2000\manager.py",
line 335, in GetManager
_mgr = BayesManager(outlook=outlook, verbose=verbose)
File "D:\util\spambayes-1.0a2\Outlook2000\manager.py",
line 79, in __init__
import_core_spambayes_stuff(self.ini_filename)
File "D:\util\spambayes-1.0a2\Outlook2000\manager.py",
line 53, in import_core_spambayes_stuff
from spambayes.tokenizer import tokenize
File "D:\util\spambayes-1.0a2\spambayes\tokenizer.py",
line 7, in ?
import email.Message
File "D:\dev\Python22\Lib\email\Message.py", line 14, in ?
from email import Utils
File "D:\dev\Python22\Lib\email\Utils.py", line 10, in ?
import random
File "D:\dev\Python22\Lib\random.py", line 93, in ?
_verify('NV_MAGICCONST', NV_MAGICCONST,
1.71552776992141)
File "D:\dev\Python22\Lib\random.py", line 88, in _verify
raise ValueError(
exceptions.ValueError: computed value for
NV_MAGICCONST deviates too much (computed 2,82843,
expected 1)
Obviously random.py uses ',' too! I'm using german
Windows/Outlook, if I can be of any help in testing, just drop
me a mail.
----------------------------------------------------------------------
Comment By: Tony Meyer (anadelonbrin)
Date: 2003-04-24 08:30
Message:
Logged In: YES
user_id=552329
Options.py now uses locale.atoi and locale.atof to convert
options. I *think* this will solve this problem, but I'm not
100%.
If someone could do some testing, that would be great. I'm
leaving open until I'm sure it's done.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=725466&group_id=61702
More information about the Spambayes
mailing list