[spambayes-dev] Strange ProxyUI problem?

Brendon Whateley spambayes at whateley.com
Mon Jan 5 19:26:57 EST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Geniuses,

I've occasionally complained (or at least alluded to) a problem when training 
sb_server using the web interface.  The problem has the symptom of getting 
more than one days defects listed in the review page, mixed with finding no 
messages to review and similar strange date related problems.  The reason I 
classified the problem as strange was that I've not seen any other reports of 
this type of problem...

So, I finally borrowed 10 minutes to learn python and dig into the problem:

In _buildReviewKeys in ProxyUI.py, the array returned by 
state.unknownCorpus.keys() is not sorted in any particular order.  This leads 
to allKeys[-1] returning unpredictable starting dates instead of the latest 
date.  It also violates the assumptions required to use bisect() on the keys.  
I solve my problem by adding an "allKeys.sort()" after getting the keys.

I assume that the keys are expected to be in order?

This also probably explains why I can't (usually) use any of the query 
functionality on the home page?  It often returned the "message may have been 
deleted" message.

The things I am doing that may qualify as "not typical":
1) I'm running from CVS.
2) I'm running on Linux.
3) I expire messages in the cache after a VERY long time.
4) I almost never "forget" any messages AND only train on unsures/mistakes and 
none extreme correctly classified stuff.  Hence I have over a months worth of 
web pages available for review.

Any thoughts before I create a defect and/or patch, etc.

Thanks,
Brendon.
-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8

iQA/AwUBP/oA0ZuupqACStRwEQIxjACgw3E3ozBIlflyp91FlBPik7j/Az8AoOHE
mrROfV7j+WCv8jqeu3pR3x1s
=41zR
-----END PGP SIGNATURE-----




More information about the spambayes-dev mailing list