[Spambayes] Problems installing and configuring SpamBayes
skip at pobox.com
skip at pobox.com
Sat Feb 5 14:20:53 CET 2011
lilliana> I downloaded SpamBayes today, but can't figure out how to use
lilliana> it. I clicked on the installing SpamBayes link in your
lilliana> documentation section, but I got "The connection was reset"
lilliana> error message....
lilliana> 500 Server error
lilliana> Traceback (most recent call last):
...
lilliana> UnboundLocalError: local variable 'state' referenced before assignment
Well, there is clearly a bug in that function which I can fix easily enough.
I'm mystified why it's never been encountered before. You appear to be
using Windows Live Mail, which might or might not work with SpamBayes.
Unfortunately, I can't make a new release for Windows. How are you with
Notepad? Do you think you can find the file sb_server.py and edit it? The
fix is a one-line change. Just search for "def _recreateState", then right
after that line, add this line:
global state
(indented with four spaces, just as I have it above). So, that bit of code
will change from
def _recreateState():
# Close the existing listeners and create new ones. This won't
# affect any running proxies - once a listener has created a proxy,
to
def _recreateState():
global state
# Close the existing listeners and create new ones. This won't
# affect any running proxies - once a listener has created a proxy,
Of course, this might not be the only bug. Given that we've apparently not
seen it before and it appears you're using a rare-for-SpamBayes mail
program, I'd rate the odds of encountering more problems as at least
"moderate".
--
Skip Montanaro - skip at pobox.com - http://www.smontanaro.net/
More information about the SpamBayes
mailing list