On Thu, Mar 09, 2017 at 07:23:38AM -0600, Skip Montanaro wrote:
>    Fred,
>    It looks like your training database is corrupt. At the very end of the
>    long traceback, the message indicates that the count of messages (ham
>    or spam) in which a particular word appears is greater than the number
>    of messages in that particular category. I think you should be able to
>    just retrain from scratch on your existing database.
>    Skip

thanks Skip! I wondered if that was the case, but thought to ask before
messing with it.

I'll give that a whirl.

thanks again!

Fred
> 
>    On Mar 8, 2017 7:11 PM, "Fred Smith" <[1]fre...@fcshome.stoneham.ma.us>
>    wrote:
> 
>      Hi
>      All of a sudden this past week I'm getting this whenever a message
>      is
>      sent to sb_filter to be retrained:
>      File "/usr/bin/sb_filter.py", line 5, in <module>
>          pkg_resources.run_script('spambayes==1.1a6', 'sb_filter.py')
>        File "/usr/lib/python2.7/site-packages/pkg_resources.py", line
>      540, in run_script
>          self.require(requires)[0].run_script(script_name, ns)
>        File "/usr/lib/python2.7/site-packages/pkg_resources.py", line
>      1455, in run_script
>          execfile(script_filename, namespace, namespace)
>        File "/usr/lib/python2.7/site-packages/spambayes-1.1a6-py2.
>      7.egg/EGG-INFO/scripts/sb_filter.py", line 277, in <module>
>          main()
>        File "/usr/lib/python2.7/site-packages/spambayes-1.1a6-py2.
>      7.egg/EGG-INFO/scripts/sb_filter.py", line 268, in main
>          action(msg)
>        File "/usr/lib/python2.7/site-packages/spambayes-1.1a6-py2.
>      7.egg/EGG-INFO/scripts/sb_filter.py", line 186, in filter
>          return self.h.filter(msg)
>        File "/usr/lib/python2.7/site-packages/spambayes-1.1a6-py2.
>      7.egg/spambayes/hammie.py", line 149, in filter
>          debug, train)
>        File "/usr/lib/python2.7/site-packages/spambayes-1.1a6-py2.
>      7.egg/spambayes/hammie.py", line 104, in score_and_filter
>          prob, clues = self._scoremsg(msg, True)
>        File "/usr/lib/python2.7/site-packages/spambayes-1.1a6-py2.
>      7.egg/spambayes/hammie.py", line 33, in _scoremsg
>          return self.bayes.spamprob(tokenize(msg), evidence)
>        File "/usr/lib/python2.7/site-packages/spambayes-1.1a6-py2.
>      7.egg/spambayes/classifier.py", line 169, in chi2_spamprob
>          clues = self._getclues(wordstream)
>        File "/usr/lib/python2.7/site-packages/spambayes-1.1a6-py2.
>      7.egg/spambayes/classifier.py", line 472, in _getclues
>          tup = self._worddistanceget(word)
>        File "/usr/lib/python2.7/site-packages/spambayes-1.1a6-py2.
>      7.egg/spambayes/classifier.py", line 487, in _worddistanceget
>          prob = self.probability(record)
>        File "/usr/lib/python2.7/site-packages/spambayes-1.1a6-py2.
>      7.egg/spambayes/classifier.py", line 287, in probability
>          assert hamcount <= nham, "Token seen in more ham than ham
>      trained."
>      AssertionError: Token seen in more ham than ham trained.
>      It is possible I got a python update, but I wasn't paying attention,
>      so
>      I'm not at all sure.
>      I'm NOT a python guru, so I'd appreciate any guidance any of you can
>      provide.
>      thanks in advance!
>      Fred
>      --
>      ---- Fred Smith -- [2]fre...@fcshome.stoneham.ma.us
>      -----------------------------
>                          The Lord detests the way of the wicked
>                        but he loves those who pursue righteousness.
>      ----------------------------- Proverbs 15:9 (niv)
>      -----------------------------
>      _______________________________________________
>      [3]SpamBayes@python.org
>      [4]https://mail.python.org/mailman/listinfo/spambayes
>      Info/Unsubscribe: [5]http://mail.python.org/
>      mailman/listinfo/spambayes
>      Check the FAQ before asking: [6]http://spambayes.sf.net/faq.html
> 
> References
> 
>    1. mailto:fre...@fcshome.stoneham.ma.us
>    2. mailto:fre...@fcshome.stoneham.ma.us
>    3. mailto:SpamBayes@python.org
>    4. https://mail.python.org/mailman/listinfo/spambayesInfo/Unsubscribe
>    5. http://mail.python.org/mailman/listinfo/spambayes
>    6. http://spambayes.sf.net/faq.html

-- 
---- Fred Smith -- fre...@fcshome.stoneham.ma.us ----------------------------
                    Do you not know? Have you not heard? 
    The LORD is the everlasting God, the Creator of the ends of the earth. 
  He will not grow tired or weary, and his understanding no one can fathom.
----------------------------- Isaiah 40:28 (niv) -----------------------------
_______________________________________________
SpamBayes@python.org
https://mail.python.org/mailman/listinfo/spambayes
Info/Unsubscribe: http://mail.python.org/mailman/listinfo/spambayes
Check the FAQ before asking: http://spambayes.sf.net/faq.html

Reply via email to