[spambayes-dev] RE: [Spambayes] Question (or possibly a bug report)

Meyer, Tony T.A.Meyer at massey.ac.nz
Thu Jul 24 17:02:37 EDT 2003


> >   File
> "E:\src\spambayes\Outlook2000\dialogs\AsyncDialog.py", line 45,
> > in set_stages
> >     assert (abs(start_pos-1.0)) < 0.001, \
> > AssertionError: Proportions must add to 1.0 (1.0,(('', 1.0),))
> 
> That one is still baffling to me, for reasons explained in
> great detail before (if none of the float literals in this 
> file get screwed, *or* if all of them get screwed by locale, 
> this assert shouldn't fail -- locale has to be screwing up 
> some of the float literals but not others, and that 
> possibility remains baffling to me).  Note that I checked in 
> a new version of this assert that displays more info when it fails.

I tried with that version, and then added a print of my own.  I get: 1.0
0.0 0.0 0.0 False
Traceback (most recent call last): [...]
  File "D:\cvs\spambayes\spambayes\Outlook2000\dialogs\AsyncDialog.py",
line 46, in set_stages
    assert abs(start_pos-1.0) < 0.001, (
AssertionError: Proportions must add to 1.0 (1.0,(('', 1.0),),0.0)

I added as line 45:
        print start_pos, start_pos-1.0, abs(start_pos-1.0), 0.001, 0.0 <
0.001

So it's 0.0 < 0.001 that fails.  Got to go to a meeting now, will try
more afterwards.

=Tony Meyer



More information about the spambayes-dev mailing list