Menu

#156 v1.0a4 dies when training on Maildir

closed-fixed
nobody
hammie (42)
8
2003-09-11
2003-07-09
Leonid
No

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/ ?

Discussion

  • Leonid

    Leonid - 2003-07-09
    • priority: 5 --> 8
    • summary: v1.0a4 dies whan training on Maildir --> v1.0a4 dies when training on Maildir
     
  • Tony Meyer

    Tony Meyer - 2003-07-09

    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).

     
  • Leonid

    Leonid - 2003-07-09

    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.

     
  • Tony Meyer

    Tony Meyer - 2003-07-09
    • status: open --> closed
     
  • Tony Meyer

    Tony Meyer - 2003-07-09

    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).

     
  • Tony Meyer

    Tony Meyer - 2003-07-09
    • status: closed --> closed-fixed
     
  • Leonid

    Leonid - 2003-07-09
    • status: closed-fixed --> open-fixed
     
  • Leonid

    Leonid - 2003-07-09

    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

     
  • Tony Meyer

    Tony Meyer - 2003-07-09
    • status: open-fixed --> closed-fixed
     
  • Tony Meyer

    Tony Meyer - 2003-07-09

    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.

     
  • Mark Hammond

    Mark Hammond - 2003-09-11
    • milestone: 235331 --> Source code 1.0a1-1.0a4
     

Log in to post a comment.