[spambayes-bugs] [ spambayes-Bugs-768221 ] v1.0a4 dies when
training on Maildir
SourceForge.net
noreply at sourceforge.net
Thu Sep 11 03:56:58 EDT 2003
Bugs item #768221, was opened at 2003-07-09 13:33
Message generated for change (Settings changed) made by mhammond
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=768221&group_id=61702
Category: hammie
>Group: Source code 1.0a1-1.0a4
Status: Closed
Resolution: Fixed
Priority: 8
Submitted By: Leonid (leobru)
Assigned to: Nobody/Anonymous (nobody)
Summary: v1.0a4 dies when training on Maildir
Initial Comment:
If Maildir/cur contains an untrained message,
mboxtrain.py dies with
Traceback (most recent call last):
File "./mboxtrain.py", line 294, in ?
main()
File "./mboxtrain.py", line 281, in main
train(h, g, False, force, trainnew)
File "./mboxtrain.py", line 216, in train
maildir_train(h, os.path.join(path, "cur"),
is_spam, force)
File "./mboxtrain.py", line 113, in maildir_train
f = file(tfn, "wb")
IOError: [Errno 2] No such file or directory:
'.../Maildir/cur/tmp/1057721381.20217_25.domain.com
What's with /cur/tmp/ ?
----------------------------------------------------------------------
Comment By: Tony Meyer (anadelonbrin)
Date: 2003-07-09 14:40
Message:
Logged In: YES
user_id=552329
Sorry, I missed that maildir_train would then try to pick it up
as a file. In any case, the v1.10 fix should still work.
----------------------------------------------------------------------
Comment By: Leonid (leobru)
Date: 2003-07-09 14:30
Message:
Logged In: YES
user_id=790676
And, worse yet, this "workaround" does not work for obvious
reasons:
Traceback (most recent call last):
File "./mboxtrain.py", line 294, in ? main()
File "./mboxtrain.py", line 281, in main train(h, g, False,
force, trainnew)
File "./mboxtrain.py", line 216, in train maildir_train(h,
os.path.join(path, "cur"), is_spam, force)
File "./mboxtrain.py", line 118, in maildir_train
os.rename(tfn, cfn)
OSError: [Errno} 21] Is a directory
----------------------------------------------------------------------
Comment By: Tony Meyer (anadelonbrin)
Date: 2003-07-09 14:30
Message:
Logged In: YES
user_id=552329
Ah, I see. This was introduced in v1.6.
Fixed in v1.10. You should be able to get this version of
mboxtrain and drop it into the a4 release. (note that sf
pserver cvs is crappy at the moment, so it might take a while
for v1.10 to be visible).
----------------------------------------------------------------------
Comment By: Leonid (leobru)
Date: 2003-07-09 14:21
Message:
Logged In: YES
user_id=790676
The temporary directory is Maildir/tmp, not Maildir/cur/tmp.
The observed behavior is a regression wrt v1.0a2;
creating a new directory is a hacky workaround.
----------------------------------------------------------------------
Comment By: Tony Meyer (anadelonbrin)
Date: 2003-07-09 13:44
Message:
Logged In: YES
user_id=552329
/cur/tmp/ is where a temporary copy of the message is stored
until it is renamed to the /cur/ name.
If you create the /cur/tmp/ directory, this should work. I
suppose mboxtrain should check that this directory exists,
and create it if it doesn't (like pop3proxy does for it's
directories).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=768221&group_id=61702
More information about the Spambayes-bugs
mailing list