[Spambayes] reporet on trying 1.0a6 on SuSE

Ian Smith ian at astounding.org.uk
Sat Sep 20 15:31:32 EDT 2003

I'm probably doing this all wrong, but I don't understand CVS or
sourceforge, and someone might like some feedback on what I've found,
particularly as 1.0a6 bills itself as getting the install sorted (I think
I saw that somewhere, but I can't find it now).

I'm trying to get 1.0a6 to work on a SuSE 8.0 linux.  This is a couple of
versions old SuSE, but is as fully updated as SuSE do without going to a
new version.

The python in SuSE 8.0 is 2.2.

SuSE do not have a package containing teh python email package, so I got
and installed that as directed in teh README.txt.

It doesn't install unless you have teh python-development SuSE package
installed (I think there's a bug report saying similar for Debian - may be
worth adding a comment that if your linux offers a 'python development'
package you probably want it).

setup.py won't run.  Try it several times, dies with horrible looking
errors.  On offchance, try using teh .zip rather than the .tar.gz.  When I
do that, setup.py gets much further - is the .tar.gz corrupt?

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 teh case, the README
statement that you need 2.2 or later is not true - you need 2.2.2 or

I know no python (specifically, I have never in my life seen any python
code before this moment), but looking in setup.py it looks like lots of
programming languages do, so I thought "why not?" and added teh lines
"True=1" and "False=0" at the top (after the #! line, before the "import
os" line).  With that change, setup.py apparently completes happily.

sb_mboxtrain won't run, complains "bad interpreter: no such file or
directory".  Aha - I know that one, and a quick peak in teh scripts - yes
indeed, all have a ^M at teh end of every line - they're dos format.
Is this because I worked from teh .zip rather than the .tar.gz? Anyway, a
ls sb_* | xargs -i recode -f ibmpc..lat1 {} in the /usr/bin directory
fixes it.

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.

Now sb_mboxtrain runs without crashing type error, but comes up with a
usage error, apparently I must specify -d or -D.  There doesn't seem to be
anything about that in teh README.

So, I try sb_imapfilter.py.  That doesn't run either - apparently "-b, -c
or -t operands must be specified".  No mention of that in teh README file,

I note that sb_mboxtrain -h says lower case -d is DBM and upper case -D is
pickle.  However, sb_imapfilter -h says lower case -d is pickled and upper
case -D is dbm.  Is this really so?  It might be easier if there was
consistency in the options.  Alternatively, one or other of them has a
wrong usage message (though I don't know which yet).

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).

Back to sb_mboxtrain.  Living dangerously, I try "sb_mboxtrain.py -d
~/.hammiedb -g ./ham -s ./spam".  That runs, and looks like it's doing
something useful.

So, getting the feel for just trying things I stick a single email in a
file sb_test_email and try "cat sb_test_email | sb_filter.py -d
~/.hammiedb".  That dies with teh complaint about False again.  Not sure I
fancy editing every script, and I'm also not certain that that's actually
working - I might be breaking something do that, so I postpone that
approach for now.

At this point I give up for the day.  I'm starting to suspect I'll have to
scrap the SuSE packaged python and put a more up-to-date one in from
source.  I'm quite keen to get spambayes working, since if it does, it
looks very

Dunno if any of that is helpful to anyone.  If anyone spots anything I've
done which is causing my problems, I'd be glad to hear it.

regards,   Ian SMith

  |\ /|      no .sig
  |o o|
  |/ \|

More information about the Spambayes mailing list