Complete.Org: Mailing Lists: Archives: offlineimap: July 2006:
Re: Offlineimap crashes when trying to sync a folder containing messages
Home

Re: Offlineimap crashes when trying to sync a folder containing messages

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: offlineimap@xxxxxxxxxxxx
Subject: Re: Offlineimap crashes when trying to sync a folder containing messages from the vim-users list
From: hdv@xxxxxxxxx (J.A. de Vries)
Date: Sat, 1 Jul 2006 11:31:59 +0000

On 2006-07-01 @ 04:52:35 (week 26) John Goerzen wrote:

> On Sat, Jul 01, 2006 at 09:42:13AM +0000, J.A. de Vries wrote:
> > Hi,
> >   File "/usr/lib/python2.3/site-packages/offlineimap/folder/IMAP.py", line 
> > 114, in getmessage
> >     return initialresult[1][0][1].replace("\r\n", "\n")
> > TypeError: unsubscriptable object
> 
> Sounds like the IMAP server is sending something odd across, so look
> towards the bottom of your debug log and see if you can see anything
> interesting.

Hi John,

Thanks for your prompt reply!

Here's the end of the log. The lines immediately before this are all imapsplit
and options2hash lines that look OK to me (with my very limited knowledge of
python). 

<start copy of loglines>

Copy message 2504 from Applications.[vim]: Copy message 2504 
IMAP[Applications.[vim]] -> Maildir[Applications.[vim]], 
LocalStatus[Applications.[vim]]
Copy message 2504 from Applications.[vim]: DEBUG[imap]:   06:48.22 > EFGN313 
UID FETCH 2504 (BODY.PEEK[])
Copy message 2504 from Applications.[vim]: DEBUG[imap]:   06:48.36 < EFGN313 OK 
Fetch completed.
Copy message 2504 from Applications.[vim]: DEBUG[imap]:   06:48.36  matched 
r'(?P<tag>EFGN\d+) (?P<type>[A-Z]+) (?P<data>.*)' => ('EFGN313', 'OK', 'Fetch 
completed.')
Copy message 2504 from Applications.[vim]: DEBUG[imap]: Returned object from 
fetching 2504: ('OK', [None])
Copy message 2505 from Applications.[vim]: Copy message 2505 
IMAP[Applications.[vim]] -> Maildir[Applications.[vim]], 
LocalStatus[Applications.[vim]]
MainThread: Thread 'Copy message 2504 from Applications.[vim]' terminated with 
exception:
Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/offlineimap/threadutil.py", line 153, 
in run
    Thread.run(self)
  File "/usr/lib/python2.3/threading.py", line 422, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.3/site-packages/offlineimap/folder/Base.py", line 272, 
in copymessageto
    message = self.getmessage(uid)
  File "/usr/lib/python2.3/site-packages/offlineimap/folder/IMAP.py", line 114, 
in getmessage
    return initialresult[1][0][1].replace("\r\n", "\n")
TypeError: unsubscriptable object


Last 4 debug messages logged for Copy message 2504 from Applications.[vim] 
prior to exception:
imap:   06:48.22 > EFGN313 UID FETCH 2504 (BODY.PEEK[])
imap:   06:48.36 < EFGN313 OK Fetch completed.
imap:   06:48.36  matched r'(?P<tag>EFGN\d+) (?P<type>[A-Z]+) (?P<data>.*)' => 
('EFGN313', 'OK', 'Fetch completed.')
imap: Returned object from fetching 2504: ('OK', [None])
MainThread: Thread 'Copy message 2504 from Applications.[vim]' terminated with 
exception:
MainThread: Traceback (most recent call last):
MainThread:   File 
"/usr/lib/python2.3/site-packages/offlineimap/threadutil.py", line 153, in run
MainThread:     Thread.run(self)
MainThread:   File "/usr/lib/python2.3/threading.py", line 422, in run
MainThread:     self.__target(*self.__args, **self.__kwargs)
MainThread:   File 
"/usr/lib/python2.3/site-packages/offlineimap/folder/Base.py", line 272, in 
copymessageto
MainThread:     message = self.getmessage(uid)
MainThread:   File 
"/usr/lib/python2.3/site-packages/offlineimap/folder/IMAP.py", line 114, in 
getmessage
MainThread:     return initialresult[1][0][1].replace("\r\n", "\n")
MainThread: TypeError: unsubscriptable object
MainThread:
MainThread:
MainThread: Last 4 debug messages logged for Copy message 2504 from 
Applications.[vim] prior to exception:
MainThread: imap:   06:48.22 > EFGN313 UID FETCH 2504 (BODY.PEEK[])
MainThread: imap:   06:48.36 < EFGN313 OK Fetch completed.
MainThread: imap:   06:48.36  matched r'(?P<tag>EFGN\d+) (?P<type>[A-Z]+) 
(?P<data>.*)' => ('EFGN313', 'OK', 'Fetch completed.')
MainThread: imap: Returned object from fetching 2504: ('OK', [None])

</end copy of loglines>

Could it be there's something weird with line endings going on here? To my
untrained eyes it seems the return from inititalresult is not what is expected,
but I might be completely wrong on this (which wouldn't surprise me at all)...

Just to be complete here's that start of the log too, so you can see what
version of offlineimap I am using. The IMAP server is dovecot 0.99.14 from
Debian Gnu/Linux Etch (testing).

<start copy of loglines>

This is OfflineIMAP 4.0.13 Rev 592
Python: 2.3.5 (#2, Jun 13 2006, 23:12:55)
[GCC 4.1.2 20060613 (prerelease) (Debian 4.1.1-4)]
Platform: linux2
Args: ['/usr/bin/offlineimap', '-a', 'draupnir', '-u', 'Curses.Blinkenlights', 
'-1', '-d', 'imap', '-l', 'offlineimap_session.log']
MainThread: OfflineIMAP 4.0.13 (Rev 592)
Copyright (C) 2002 - 2005 John Goerzen <jgoerzen@xxxxxxxxxxxx>
This software comes with ABSOLUTELY NO WARRANTY; see the file
COPYING for details.  This is free software, and you are welcome
to distribute it under the conditions laid out in COPYING.
MainThread: OfflineIMAP 4.0.13 (Rev 592)
MainThread: Copyright (C) 2002 - 2005 John Goerzen <jgoerzen@xxxxxxxxxxxx>
MainThread: This software comes with ABSOLUTELY NO WARRANTY; see the file
MainThread: COPYING for details.  This is free software, and you are welcome
MainThread: to distribute it under the conditions laid out in COPYING.
MainThread: Now debugging for imap: IMAP protocol debugging
Account sync draupnir: ***** Processing account draupnir
Account sync draupnir: Copying folder structure from IMAP to Maildir
Account sync draupnir: Establishing connection to draupnir.########:993.
Account sync draupnir: DEBUG[imap]:   05:15.16 imaplib version 2.52
Account sync draupnir: DEBUG[imap]:   05:15.16 new IMAP4 connection, tag=EFGN
Account sync draupnir: DEBUG[imap]:   05:15.33 < * OK dovecot ready.
Account sync draupnir: DEBUG[imap]:   05:15.33  matched r'\* (?P<type>[A-Z-]+)( 
(?P<data>.*))?' => ('OK', ' dovecot ready.', 'dovecot ready.')
Account sync draupnir: DEBUG[imap]:   05:15.33 untagged_responses[OK] 0 += 
["dovecot ready."]
Account sync draupnir: DEBUG[imap]:   05:15.33 > EFGN0 CAPABILITY
Account sync draupnir: DEBUG[imap]:   05:15.46 < * CAPABILITY IMAP4rev1 SORT 
THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN LISTEXT 
LIST-SUBSCRIBED NAMESPACE AUTH=PLAIN
Account sync draupnir: DEBUG[imap]:   05:15.46  matched r'\* (?P<type>[A-Z-]+)( 
(?P<data>.*))?' => ('CAPABILITY', ' IMAP4rev1 SORT THREAD=REFERENCES 
MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN LISTEXT LIST-SUBSCRIBED NAMESPACE 
AUTH=PLAIN', 'IMAP4rev1 SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ 
IDLE CHILDREN LISTEXT LIST-SUBSCRIBED NAMESPACE AUTH=PLAIN')
Account sync draupnir: DEBUG[imap]:   05:15.46 untagged_responses[CAPABILITY] 0 
+= ["IMAP4rev1 SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE 
CHILDREN LISTEXT LIST-SUBSCRIBED NAMESPACE AUTH=PLAIN"]
Account sync draupnir: DEBUG[imap]:   05:15.46 < EFGN0 OK Capability completed.
Account sync draupnir: DEBUG[imap]:   05:15.46  matched r'(?P<tag>EFGN\d+) 
(?P<type>[A-Z]+) (?P<data>.*)' => ('EFGN0', 'OK', 'Capability completed.')
Account sync draupnir: DEBUG[imap]:   05:15.46 CAPABILITIES: ('IMAP4REV1', 
'SORT', 'THREAD=REFERENCES', 'MULTIAPPEND', 'UNSELECT', 'LITERAL+', 'IDLE', 
'CHILDREN', 'LISTEXT', 'LIST-SUBSCRIBED', 'NAMESPACE', 'AUTH=PLAIN')
Account sync draupnir: DEBUG[imap]: Attempting plain authentication
Account sync draupnir: DEBUG[imap]:   05:20.46 > EFGN1 LOGIN ######## ########
Account sync draupnir: DEBUG[imap]:   05:20.60 < EFGN1 OK Logged in.

</end copy of loglines>

Thanks for trying to help.

Grx HdV





[Prev in Thread] Current Thread [Next in Thread]