I've been using spambayes on my linux system for years, always with great results. The system is running Centos 5.x (where x is latest), which claims to have pyton 2.4.3. It's been running Spambayes 1.1a4 for some time, but on a whim I decided to update it to 1.1a6, yesterday. so I did the download, ran "python setup.py install". Saw that mail was still being delivered and figured that was good enough. several hours later I noticed that no spam was being filtered. A little investigation noted that the X-Spambayes header is not being added to any of the new mails being delivered. inspecting /var/log/messaes showed selinux errors coming from spambayes, so I followed the instructions given in the error msgs and solved the selinux problem. but still no X-Spambayes header in the mail being delivered. and I don't see any error messages anywhere, neither /var/log/messages, nor /var/log/maillog. overnight, when the database tools run (to, I assume, train/re-train, and whatever else they do) the email notification gave me the following message(s): Attempted to set [Storage] persistent_use_database with invalid value True +(<type 'str'>) Traceback (most recent call last): File "/usr/bin/sb_mboxtrain.py", line 5, in ? pkg_resources.run_script('spambayes==1.1a6', 'sb_mboxtrain.py') File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 407, in +run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 1084, in +run_script execfile(script_filename, namespace, namespace) File +"/usr/lib/python2.4/site-packages/spambayes-1.1a6-py2.4.egg/EGG-INFO/scripts/sb +_mboxtrain.py", line 47, in ? from spambayes import hammie, storage, mboxutils File +"/usr/lib/python2.4/site-packages/spambayes-1.1a6-py2.4.egg/spambayes/hammie.py +", line 6, in ? from spambayes import storage File +"/usr/lib/python2.4/site-packages/spambayes-1.1a6-py2.4.egg/spambayes/storage.p +y", line 62, in ? from spambayes import classifier File +"/usr/lib/python2.4/site-packages/spambayes-1.1a6-py2.4.egg/spambayes/classifie +r.py", line 60, in ? from spambayes.safepickle import pickle_read, pickle_write File +"/usr/lib/python2.4/site-packages/spambayes-1.1a6-py2.4.egg/spambayes/safepickl +e.py", line 7, in ? import lockfile File "/usr/lib/python2.4/site-packages/PIL/__init__.py", line 279, in ? File +"/usr/lib/python2.4/site-packages/lockfile-0.9.1-py2.4.egg/lockfile/linklockfil +e.py", line 6 from . import (LockBase, LockFailed, NotLocked, NotMyLock, LockTimeout, ^ SyntaxError: invalid syntax I don't know what that all means, but it doesn't look good. so in desperation (and based on the theory that maybe 1.1a6 really doesn't work on pyton 2.4.3 despite what the docs say), I re-installed Spambayes 1.1a4 over the top of what I then had. much shorter output than what I got from installing 1.1a6, but no errors were reported. But I'm still not getting any X-Spambayes headers added to my emails. So, what did I do wrong, and how can I recover from it? thanks! Fred -- ---- Fred Smith -- fredex@fcshome.stoneham.ma.us ----------------------------- But God demonstrates his own love for us in this: While we were still sinners, Christ died for us. ------------------------------- Romans 5:8 (niv) ------------------------------
On Tue, Jul 24, 2012 at 12:03:03PM -0400, fred smith wrote:
I've been using spambayes on my linux system for years, always with great results.
The system is running Centos 5.x (where x is latest), which claims to have pyton 2.4.3.
It's been running Spambayes 1.1a4 for some time, but on a whim I decided to update it to 1.1a6, yesterday.
so I did the download, ran "python setup.py install". Saw that mail was still being delivered and figured that was good enough.
several hours later I noticed that no spam was being filtered. A little investigation noted that the X-Spambayes header is not being added to any of the new mails being delivered.
inspecting /var/log/messaes showed selinux errors coming from spambayes, so I followed the instructions given in the error msgs and solved the selinux problem.
but still no X-Spambayes header in the mail being delivered. and I don't see any error messages anywhere, neither /var/log/messages, nor /var/log/maillog.
overnight, when the database tools run (to, I assume, train/re-train, and whatever else they do) the email notification gave me the following message(s):
Attempted to set [Storage] persistent_use_database with invalid value True +(<type 'str'>) Traceback (most recent call last): File "/usr/bin/sb_mboxtrain.py", line 5, in ? pkg_resources.run_script('spambayes==1.1a6', 'sb_mboxtrain.py') File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 407, in +run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 1084, in +run_script execfile(script_filename, namespace, namespace) File +"/usr/lib/python2.4/site-packages/spambayes-1.1a6-py2.4.egg/EGG-INFO/scripts/sb +_mboxtrain.py", line 47, in ? from spambayes import hammie, storage, mboxutils File +"/usr/lib/python2.4/site-packages/spambayes-1.1a6-py2.4.egg/spambayes/hammie.py +", line 6, in ? from spambayes import storage File +"/usr/lib/python2.4/site-packages/spambayes-1.1a6-py2.4.egg/spambayes/storage.p +y", line 62, in ? from spambayes import classifier File +"/usr/lib/python2.4/site-packages/spambayes-1.1a6-py2.4.egg/spambayes/classifie +r.py", line 60, in ? from spambayes.safepickle import pickle_read, pickle_write File +"/usr/lib/python2.4/site-packages/spambayes-1.1a6-py2.4.egg/spambayes/safepickl +e.py", line 7, in ? import lockfile File "/usr/lib/python2.4/site-packages/PIL/__init__.py", line 279, in ?
File +"/usr/lib/python2.4/site-packages/lockfile-0.9.1-py2.4.egg/lockfile/linklockfil +e.py", line 6 from . import (LockBase, LockFailed, NotLocked, NotMyLock, LockTimeout, ^ SyntaxError: invalid syntax
and I bet that "from . import..." statement is the culprit (and possibly others like it). This version of LInux uses Pyton 2.4.3. the spambayes documentation says 2.2 should work. but looking at python.org I see that the syntax used above didn't exist before 2.5. So, once again I'd appreciate some guidance here,... would it be reasonable to hack all the python modules that use "from .", or would it be best to revert to the older version of spambayes I was using? And if the best option is to revert, some guidance on how to do it would be appreciated. As mentioned right below here, I tried reinstalling the prior version but it now does not work either. I don't know where to turn from here. HELP ???
I don't know what that all means, but it doesn't look good.
so in desperation (and based on the theory that maybe 1.1a6 really doesn't work on pyton 2.4.3 despite what the docs say), I re-installed Spambayes 1.1a4 over the top of what I then had. much shorter output than what I got from installing 1.1a6, but no errors were reported.
But I'm still not getting any X-Spambayes headers added to my emails.
So, what did I do wrong, and how can I recover from it?
thanks!
Fred
-- ------------------------------------------------------------------------------- .---- Fred Smith / ( /__ ,__. __ __ / __ : / / / / /__) / / /__) .+' Home: fredex@fcshome.stoneham.ma.us / / (__ (___ (__(_ (___ / :__ 781-438-5471 -------------------------------- Jude 1:24,25 ---------------------------------
On Tue, Jul 24, 2012 at 10:01:14PM -0400, fred smith wrote:
On Tue, Jul 24, 2012 at 12:03:03PM -0400, fred smith wrote:
I've been using spambayes on my linux system for years, always with great results.
The system is running Centos 5.x (where x is latest), which claims to have pyton 2.4.3.
It's been running Spambayes 1.1a4 for some time, but on a whim I decided to update it to 1.1a6, yesterday.
<snip>
overnight, when the database tools run (to, I assume, train/re-train, and whatever else they do) the email notification gave me the following message(s):
Attempted to set [Storage] persistent_use_database with invalid value True +(<type 'str'>) Traceback (most recent call last):
<snip>
File +"/usr/lib/python2.4/site-packages/lockfile-0.9.1-py2.4.egg/lockfile/linklockfil +e.py", line 6 from . import (LockBase, LockFailed, NotLocked, NotMyLock, LockTimeout, ^ SyntaxError: invalid syntax
and I bet that "from . import..." statement is the culprit (and possibly others like it).
This version of LInux uses Pyton 2.4.3. the spambayes documentation says 2.2 should work. but looking at python.org I see that the syntax used above didn't exist before 2.5.
OK, problem "solved"... for values of "solved", by removing all traces of the newer version and doing a fresh install of 1.1a4. In at least some places on the SpamBayes web site (and/or in the various documentation files included inside the package) it clearly says that 1.1a6 (and even 1.1b1) CAN RUN WITH PYTHON 2.2. This is BLATANTLY INCORRECT. Please, someone, go fix that error so someone else doesn't get stuck in this same ghetto. The "from . import" syntax DOES NOT WORK ON PYTHON 2.4.3. I don't really know if there may also be other gotchas, too, re version compatibility, but there is at least that one, in several places. ----------------- Nevertheless, I don't mean to be complaining, I'm just hoping to warn others before they land here where I've been. I think SpamBayes is great! I've been using it for several years and love it. thanks MUCHLY for the wonderful tool! Fred -- ---- Fred Smith -- fredex@fcshome.stoneham.ma.us ----------------------------- "For him who is able to keep you from falling and to present you before his glorious presence without fault and with great joy--to the only God our Savior be glory, majesty, power and authority, through Jesus Christ our Lord, before all ages, now and forevermore! Amen." ----------------------------- Jude 1:24,25 (niv) -----------------------------
participants (1)
-
fred smith