[Spambayes] UnboundLocalError: local variable 'math' referenced before assignment

Amedee Van Gasse amedee at vangasse.eu
Thu Mar 24 13:45:57 CET 2011


FYI, it's not really a support request. Everything seems to be working
just fine.
I noticed this in my procmail log. Any ideas/comments? I guess that this
is related to "header_score_logarithm=True" that I recently added in my
.spambayesrc




Traceback (most recent call last):
  File "/usr/bin/sb_filter.py", line 5, in <module>
    pkg_resources.run_script('spambayes==1.1a6', 'sb_filter.py')
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 489, in
run_script
    if dist.key not in keys2:
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1207, in
run_script
    NullProvider.__init__(self,module)
  File
"/usr/lib/python2.5/site-packages/spambayes-1.1a6-py2.5.egg/EGG-INFO/scripts/sb_filter.py",
line 277, in <module>
    main()
  File
"/usr/lib/python2.5/site-packages/spambayes-1.1a6-py2.5.egg/EGG-INFO/scripts/sb_filter.py",
line 268, in main
    action(msg)
  File
"/usr/lib/python2.5/site-packages/spambayes-1.1a6-py2.5.egg/EGG-INFO/scripts/sb_filter.py",
line 186, in filter
    return self.h.filter(msg)
  File
"/usr/lib/python2.5/site-packages/spambayes-1.1a6-py2.5.egg/spambayes/hammie.py",
line 149, in filter
    debug, train)
  File
"/usr/lib/python2.5/site-packages/spambayes-1.1a6-py2.5.egg/spambayes/hammie.py",
line 124, in score_and_filter
    x = -math.log10(1.0-prob)
UnboundLocalError: local variable 'math' referenced before assignment
procmail: Program failure (1) of "/usr/bin/sb_filter.py"
procmail: Rescue of unfiltered data succeeded


-- 




More information about the SpamBayes mailing list