[spambayes-bugs] [ spambayes-Bugs-768221 ] v1.0a4 dies when training on Maildir

SourceForge.net noreply at sourceforge.net
Tue Jul 8 22:30:59 EDT 2003


Bugs item #768221, was opened at 2003-07-08 20:33
Message generated for change (Comment added) made by leobru
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=768221&group_id=61702

Category: hammie
Group: v1.0 (example)
>Status: Open
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: Leonid (leobru)
Date: 2003-07-08 21: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-08 21: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-08 21: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-08 20: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