[Spambayes] timtest broke?

Tim Peters tim.one@comcast.net
Tue, 10 Sep 2002 13:12:51 -0400


[Skip Montanaro]
> After my latest cvs up, timtest fails with
>
>     Traceback (most recent call last):
>       File "/home/skip/src/spambayes/timtest.py", line 294, in ?
>         drive(nsets)
>       File "/home/skip/src/spambayes/timtest.py", line 264, in drive
>         d = Driver()
>       File "/home/skip/src/spambayes/timtest.py", line 152, in __init__
>         self.global_ham_hist = Hist(options.nbuckets)
>     AttributeError: 'OptionsClass' object has no attribute 'nbuckets'
>
> I'm running it as
>
>     timtest -n5 > Data/timtest.out
>
> from my ~/Mail directory (not from my ~/src/spambayes directory).  If I
> create a symlink to ~/src/spambayes/bayes.ini it works once again, but
> shouldn't there be an nbuckets attribute with a default value already?

I never used ConfigParser before, but I read that its read() method silently
ignores files that don't exist.  If 'bayes.ini' isn't found, *none* of the
options will be defined.  Since you want to run this from a directory other
than my spambayes directory, it's up to you to check in changes to make that
possible <wink>.