Offlineimap OSX Snow Leopard - All but one account sync, but Gmail sync crashes on duplicate file?

0

I am setting up Offlineimap and Mutt on OSX Snow Leopard. I am almost done and have 5 accounts working/syncing. However, my main Gmail crashes every time I try to sync it! I don't know what is going on as the other accounts are also on Gmail and don't have problems. The main Gmail account has way more messages in it (>5gb) -- is that perhaps the issue? I have googled this error message endlessly and found nothing. The error message indicates "OSError: [Errno 17] File exists: '[Gmail].Sent Mail'" -- however I have deleted this file/folder repeatedly and made sure the .offlineimaprc is clean. Also, the other accounts were set up the same way and don't experience this problem. Really have no idea how to proceed from here but probably there is some painfully obvious answer.

Thank you very much!

Rabbit on Rails

Thread 'Account sync Gmail' terminated with exception:
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/offlineimap/threadutil.py", line 149, in run
    Thread.run(self)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/offlineimap/accounts.py", line 183, in syncrunner
    self.sync(siglistener)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/offlineimap/accounts.py", line 220, in sync
    remoterepos.syncfoldersto(localrepos, [statusrepos])
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/offlineimap/repository/Base.py", line 155, in syncfoldersto
    dest.makefolder(key)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/offlineimap/repository/Maildir.py", line 101, in makefolder
    os.makedirs(foldername, 0700)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 17] File exists: '[Gmail].Sent Mail'


Last 50 debug messages logged for Account sync Gmail prior to exception:
imap: imapsplit() called with input: \HasChildren \HasNoChildren
imap: imapsplit() returning: ['\\HasChildren', '\\HasNoChildren']
imap: dequote() called with input: "[Gmail]/Drafts"
imap: dequote() returning: [Gmail]/Drafts
imap: dequote() called with input: [Gmail]/Drafts
imap: imapsplit() called with input: (\HasNoChildren) "/" "[Gmail]/Sent Mail"
imap: imapsplit() returning: ['(\\HasNoChildren)', '"/"', '"[Gmail]/Sent Mail"']
imap: imapsplit() called with input: \HasNoChildren
imap: imapsplit() returning: ['\\HasNoChildren']
imap: dequote() called with input: "[Gmail]/Sent Mail"
imap: dequote() returning: [Gmail]/Sent Mail
imap: dequote() called with input: [Gmail]/Sent Mail
imap: imapsplit() called with input: (\HasChildren \HasNoChildren) "/" "[Gmail]/Starred"
imap: imapsplit() returning: ['(\\HasChildren \\HasNoChildren)', '"/"', '"[Gmail]/Starred"']
imap: imapsplit() called with input: \HasChildren \HasNoChildren
imap: imapsplit() returning: ['\\HasChildren', '\\HasNoChildren']
imap: dequote() called with input: "[Gmail]/Starred"
imap: dequote() returning: [Gmail]/Starred
imap: dequote() called with input: [Gmail]/Starred
imap: imapsplit() called with input: (\HasChildren \HasNoChildren) "/" "[Gmail]/Trash"
imap: imapsplit() returning: ['(\\HasChildren \\HasNoChildren)', '"/"', '"[Gmail]/Trash"']
imap: imapsplit() called with input: \HasChildren \HasNoChildren
imap: imapsplit() returning: ['\\HasChildren', '\\HasNoChildren']
imap: dequote() called with input: "[Gmail]/Trash"
imap

rabbit on rails

Posted 2011-02-12T17:20:31.060

Reputation: 101

Answers

0

Okay, as usual, actually writing out the question caused me to think about it differently and I found the (easy) solution. I'll post it here in case anyone else runs into this:

The problem was that somehow during earlier setup (or some other way), either Offlineimap or Mutt added a tag/folder to my Gmail account called "[Gmail]/Sent Mail". Then it was trying to add it again and failing because it was already there. So I went into Gmail and deleted this duplicate tag, and the sync went through.

rabbit on rails

Posted 2011-02-12T17:20:31.060

Reputation: 101

0

I think you may find things easier if you use the newest OfflineIMAP (available from github). It has modifications and configuration specifications explicitly for Gmail.

I can't find it in the documentation, but the sample config file shows how to do the Gmail configuration. OfflineIMAP actually has a type=Gmail setting. Search for gmail on the page. It is around line 260, though it may move by the time you look at it.

Neil Smithline

Posted 2011-02-12T17:20:31.060

Reputation: 123