[Spambayes] reporet on trying 1.0a6 on SuSE
Ian Smith
ian at astounding.org.uk
Sun Sep 21 07:44:44 EDT 2003
On Sun, 21 Sep 2003, Meyer, Tony wrote:
> > However, setup.py still won't complete. It now moans that "name
> > 'False' is not defined". Some poking around teh web leads me to
> > believe that True and False were added in python 2.2.2. If that is
> > the case, the README statement that you need 2.2 or later is not true
> > - you need 2.2.2 or later.
>
> That's a bug in setup.py. All the actual scripts should work fine in
> 2.2. I've checked in a fix for the setup bug.
Ah. As I go on to say, I get some problems in teh scripts too.
> > Next I run sb_mboxtrain. That fails with teh same complaint about
> > FALSE. Reading teh traceback, it seemed the actual complaint was
> > related to site-packages/spambayes/Options.py, so I put True=1 and
> > False=0 lines in tehre, just above import sys, os.
>
> This shouldn't happen - sb_mboxtrain should define True and False before
> it tries to import Options.py. I don't suppose you still have a copy of
> the traceback?
No, but I can take teh lines out and run it again:
sb_mboxtrain.py -d ~/.hammiedb -s spambayes/spam -g spambayes/ham
Traceback (most recent call last):
File "/usr/bin/sb_mboxtrain.py", line 50, in ?
from spambayes import hammie, mboxutils
File "/usr/lib/python2.2/site-packages/spambayes/hammie.py",
line 5, in ?
from spambayes import storage
File "/usr/lib/python2.2/site-packages/spambayes/storage.py",
line 67, in ?
from spambayes import classifier
File "/usr/lib/python2.2/site-packages/spambayes/classifier.py",
line 43, in ?
from spambayes.Options import options
File "/usr/lib/python2.2/site-packages/spambayes/Options.py",
line 33, in ?
defaults = {
NameError: name 'False' is not defined
[I've added line breaks immediately before 'line nn' so it fits within
normal email line lengths]
> > sb_imapfilter.py -b runs up lynx (the machine it's running on doesn't
> > have X, so that's the best browser available), but lynx hangs for a
> > long, long time at "HTTP request sent; waiting for response". Not
> > sure where the hang is occurring, and it's never given up (or at
> > least, I've always interrupted it first).
>
> Hmm. If you run sb_server.py and go to http://localhost:8880, does it
> hang then, too? Using "Lynx Version 2.8.4rel.1 (17 Jul 2001)" works
> fine for me.
Well, if I runb sb_server.py I get told False is not defined again:
Traceback (most recent call last):
File "/usr/bin/sb_server.py", line 101, in ?
import spambayes.message
File "/usr/lib/python2.2/site-packages/spambayes/message.py",
line 99, in ?
from spambayes.tokenizer import tokenize
File "/usr/lib/python2.2/site-packages/spambayes/tokenizer.py",
line 22, in ?
from spambayes.Options import options
File "/usr/lib/python2.2/site-packages/spambayes/Options.py",
line 33, in ?
defaults = {
NameError: name 'False' is not defined
If I put the True=1 False=0 lines back in Options.py sb_server.py works
fine (at least, lynx displays a page for it).
> > "cat sb_test_email | sb_filter.py -d
> > ~/.hammiedb". That dies with teh complaint about False again.
>
> Again, if you had the traceback, that would be helpful. There's a lot
> of code scattered about that's meant to provide False/True if it doesn't
> exist, which should be working...
Traceback (most recent call last):
File "/usr/bin/sb_filter.py", line 187, in ?
main()
File "/usr/bin/sb_filter.py", line 157, in main
h.usedb = True
NameError: global name 'True' is not defined
I'm still intent on getting it working on my system, so I'll hopefully
have some more reports shortly.
regards, Ian SMith
--
|\ /| no .sig
|o o|
|/ \|
More information about the Spambayes
mailing list