Return-Path: tim.one@comcast.net Delivery-Date: Tue Sep 10 18:12:51 2002 From: tim.one@comcast.net (Tim Peters) Date: Tue, 10 Sep 2002 13:12:51 -0400 Subject: [Spambayes] timtest broke? In-Reply-To: <15742.8105.960711.715561@12-248-11-90.client.attbi.com> Message-ID: [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 .