ValueError: Backend could not find uid for message

Sebastian Spaeth Sebastian at SSpaeth.de
Thu Feb 16 15:52:30 UTC 2012


On Mon, 13 Feb 2012 16:09:35 -0600, John Wiegley <jwiegley at gmail.com> wrote:
> I'm seeing a LOT of these lately, usually 1 in every four syncs.  Plus, it
> causes my offlineimap to abort so that I have to remember to keep restarting
> it.

> imap: savemessage: called
> imap: savemessage: date: "12-Feb-2012 14:30:50 -0600"
>...
> imap: savemessage: returning new UID 0

DOH, that is weird. You save a message to the LOCAL imap and when
running the savemessage() function which is supposed to return the UID
of the saved mail. However your's returns '0' (meaning could not find
the UID). THis will not lead to data loss (but possibly a duplicated
message).

1) Can you tell if your server supports the UIDPLUS extension (check
with --info switch"? It uses a different code path then.

2) could you insert a debug output in line 575 in folder/IMAP.py?
    # get new UID from the APPENDUID response, it could look
    # like OK [APPENDUID 38505 3955] APPEND completed with
    # 38505 being folder UIDvalidity and 3955 the new UID.
    typ, resp = imapobj.response('APPENDUID')
+   self.ui.warn("Moo" + str(resp))

I would be interested to see what the server returns so that we can
debug this? Alternatively, check from the current "next" branch, which
contains better error reporting too. The commit is 7da50e6.
I would need a log of a failing run to get an idea what exactly fails
here.

Thanks for helping me find that out...
Sebastian



More information about the OfflineIMAP-project mailing list