gmail -> gmail: required special treatment?

Dr. D. P. Kreil (Boku) David.Kreil at boku.ac.at
Mon Jan 9 09:36:23 GMT 2012


Dear Sebastian,

It seems to fix the original error. A few messages later, however, I
reproducibly run into the next problem. Log is below. Many thanks for all
your help!

Best wishes,
David.

OfflineIMAP 6.5.2-rc1
  Licensed under the GNU GPL v2+ (v2 or any later version)
*** Processing account dpk
Establishing connection to imap.gmail.com:993
Establishing connection to imap.googlemail.com:993
Syncing PhDprogramme: Gmail -> MappedIMAP
Syncing INBOX: Gmail -> MappedIMAP
Syncing Templates: Gmail -> MappedIMAP
Copy message 91781 (1 of 464) dpkreil:INBOX -> 0509kreil
Copy message 91784 (2 of 464) dpkreil:INBOX -> 0509kreil
Syncing Zattach: Gmail -> MappedIMAP
Copy message 91786 (3 of 464) dpkreil:INBOX -> 0509kreil
ERROR: 'NoneType' object is unsubscriptable
Copy message 91787 (4 of 464) dpkreil:INBOX -> 0509kreil
Thread 'Copy message from dpkreil:INBOX' terminated with exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/offlineimap/threadutil.py",
line 155, in run
    Thread.run(self)
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.6/dist-packages/offlineimap/folder/Base.py",
line 288, in copymessageto
    new_uid = dstfolder.savemessage(uid, message, flags, rtime)
  File
"/usr/local/lib/python2.6/dist-packages/offlineimap/folder/UIDMaps.py",
line 192, in savemessage
    newluid = self._mb.savemessage(-1, content, flags, rtime)
  File "/usr/local/lib/python2.6/dist-packages/offlineimap/folder/IMAP.py",
line 582, in savemessage
    uid = long(resp[-1].split(' ')[1])
TypeError: 'NoneType' object is unsubscriptable


Last 4 debug messages logged for Copy message from dpkreil:INBOX prior to
exception:
thread: Register new thread 'Copy message from dpkreil:INBOX' (account
'dpk')
imap: Returned object from fetching 91781: 'Delivered-To: dpkreil at gmail.com
Received: by 10.213.4.200 with SMTP id 8cs44870ebs;
        Tue, 13 Dec 2011 04:11:56 -0800 (PST)
Received: by 10.204....VFT0YK

------_=_NextPart_001_01CCB990.5A05C4D8--
'
imap: savemessage: called
imap: savemessage: date: "13-Dec-2011 12:11:32 +0000", content:
'Delivered-To: dpkreil at gmail.com
Received: by 10.213.4.200 with SMTP id 8cs44870ebs;
        Tue, 13 Dec 2011 04:11:56 -0800 (PST)
Received: by 10.2...0YK

------_=_NextPart_001_01CCB990.5A05C4D8--
'
ERROR: Exceptions occurred during the run!
ERROR: 'NoneType' object is unsubscriptable


On 9 January 2012 09:27, Sebastian Spaeth <Sebastian at sspaeth.de> wrote:

> On Sun, 8 Jan 2012 19:12:30 +0000, "Dr. D. P. Kreil (Boku)" wrote:
> > Excellent! I just got the latest (v6.5.1.2-1-gb5a1315) and tried it and
> it
> > indeed does not create the folders on the "remote" side anymore - yeah!
>
> That is good.
>
> > I now get some "new" error messages about UIDs not mapping though. What
> can
> > I do to help debug this? I have copied the tty output of the process
> below.
> > What else can I do?
>
> > > Gmail is a descendent of the IMAPRepository class. Local IMAPs require
> > > the MappedIMAP class which takes care of the UID mapping between the
> > > local and the remote server. In order to get a 'Gmail' type on the
> local
> > > side, one would need to subclass the MappedIMAP class and add the Gmail
> > > specific stuff (I wonder if we could that that with a Gmail mixin
> > > class instead). HTH
> > Ok! Will I need to read into the current way of doing things at length
> > before I can touch anything without breaking things, or should I just
> start
> > fiddling? If you think I should read up before touching anything, are
> there
> > any key documents / code regions I should start with that you can
> recommend?
> > If you think I am more likely to cause harm than help by poking around in
> > the code myself, would anyone else perhaps be interested in giving this a
> > go? I would be most enthusiastic about helping try/test/validate this at
> > least.
> You can start fiddling right away. However, I would be more happy if we
> could simply use Gmail as any regular IMAP server and just have it
> called IMAP and work :-).
>
> > "/usr/local/lib/python2.6/dist-packages/offlineimap/folder/UIDMaps.py",
> > line 194, in savemessage
> >     raise ValueError("Backend could not find uid for message")
> > ValueError: Backend could not find uid for message
>
> Sigh, please check if the just released v6.5.2-rc1 (or git current
> master) fixes this for you. Here is the commit log for details:
>
> commit 3284e010ff12a8c6a80e8ea299af26e80edcd4c0
> Author: Sebastian Spaeth <Sebastian at SSpaeth.de>
> Date:   Mon Jan 9 09:51:43 2012 +0100
>
> Revert "use .response() rather _get_untagged_response()"
>
> Recently the internal function use of imaplib2's
> _get_untagged_response() was switched to use the public documented
> .response() function (which should return the same data). However within
> a few fays we received reports that both uses of a) the UIDVALIDITY
> fetching and b) the APPENDUID fetching returned [None] as data although
> the IMAP log definitely shows that data was returned. Revert to using
> the undocumented internal imaplib2 function, that seemed to have worked
> without problems. This needs to be taken up to the imaplib2 developer.
>
> Let me know if this is better
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20120109/de302d3e/attachment-0003.html>


More information about the OfflineIMAP-project mailing list