You are not logged in.

#1 2008-05-13 20:51:33

fiod
Member
Registered: 2007-04-02
Posts: 205

OfflineImap doesn't sync files

Hey,

I got this error when trying to use offlineimap for the first time.
The configuration file (and the error) is attached:
.offlineimaprc:

[general]
accounts = Test

[Account Test]
localrepository = Local
remoterepository = Remote

[Repository Local]
type = Maildir
localfolders = ~/Test

[Repository Remote]
type = IMAP
remotehost = imap.gmail.com
remoteuser = <my user>@gmail.com
remotepass = <mypass>
ssl = yes

The error message:

hread 'Account sync Test' terminated with exception:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/offlineimap/threadutil.py", line 153, in run
    Thread.run(self)
  File "/usr/lib/python2.5/threading.py", line 446, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.5/site-packages/offlineimap/accounts.py", line 114, in syncrunner
    self.sync()
  File "/usr/lib/python2.5/site-packages/offlineimap/accounts.py", line 148, in sync
    remoterepos.syncfoldersto(localrepos, [statusrepos])
  File "/usr/lib/python2.5/site-packages/offlineimap/repository/Base.py", line 157, in syncfoldersto
    copyfolder.makefolder(key.replace(dest.getsep(), src.getsep()))
  File "/usr/lib/python2.5/site-packages/offlineimap/repository/LocalStatus.py", line 43, in makefolder
    file = open(filename + ".tmp", "wt")
IOError: [Errno 2] No such file or directory: '/home/fio/.offlineimap/Account-Test/LocalStatus/[Gmail]/Sent Mail.tmp'


Last 50 debug messages logged for Account sync Test prior to exception:
imap: dequote() called with input: [Gmail]/All Mail
imap: imapsplit() called with input: (\HasNoChildren) "/" "[Gmail]/Drafts"
imap: imapsplit() returning: ['(\\HasNoChildren)', '"/"', '"[Gmail]/Drafts"']
imap: imapsplit() called with input: \HasNoChildren
imap: imapsplit() returning: ['\\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: (\HasNoChildren) "/" "[Gmail]/Spam"
imap: imapsplit() returning: ['(\\HasNoChildren)', '"/"', '"[Gmail]/Spam"']
imap: imapsplit() called with input: \HasNoChildren
imap: imapsplit() returning: ['\\HasNoChildren']
imap: dequote() called with input: "[Gmail]/Spam"
imap: dequote() returning: [Gmail]/Spam
imap: dequote() called with input: [Gmail]/Spam
imap: imapsplit() called with input: (\HasNoChildren) "/" "[Gmail]/Starred"
imap: imapsplit() returning: ['(\\HasNoChildren)', '"/"', '"[Gmail]/Starred"']
imap: imapsplit() called with input: \HasNoChildren
imap: imapsplit() returning: ['\\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: (\HasNoChildren) "/" "[Gmail]/Trash"
imap: imapsplit() returning: ['(\\HasNoChildren)', '"/"', '"[Gmail]/Trash"']
imap: imapsplit() called with input: \HasNoChildren
imap: imapsplit() returning: ['\\HasNoChildren']
imap: dequote() called with input: "[Gmail]/Trash"
imap: dequote() returning: [Gmail]/Trash
imap: dequote() called with input: [Gmail]/Trash
maildir: _GETFOLDERS_SCANDIR STARTING. root = /home/fio/Test, extension = None
maildir:   toppath = /home/fio/Test
maildir:   *** top of loop
maildir:   dirname = [Gmail].All Mail
maildir:   fullname = /home/fio/Test/[Gmail].All Mail
maildir:   This is a maildir folder.
maildir:   foldername = [Gmail].All Mail
maildir:   *** top of loop
maildir:   dirname = .
maildir:   fullname = /home/fio/Test/.
maildir: _GETFOLDERS_SCANDIR RETURNING ['[Gmail].All Mail']
maildir: makefolder called with arg '[Gmail].Sent Mail'
maildir: makefolder: calling makedirs [Gmail].Sent Mail
maildir: makefolder: creating cur, new, tmp

Something about some tmp file isn't available..

Would appreciate any help,
fiod

Offline

#2 2008-05-14 08:05:43

WhiteMagic
Member
Registered: 2007-03-01
Posts: 85

Re: OfflineImap doesn't sync files

I had these kinds of errors mostly when starting offlineimap for the first time, because it always had some problems when it came to create nested folder structures. I don't know which version you are using but the newest version 5.99.15 was released just two days ago and looking at the commit logs it seems to have fixed problem related to the creation of folders.
So if you're not using the lates version try using that one and see if that fixes your problem.

The other thing is that the path offlineimap tries to create a folder containing brackets, i.e. [Gmail]. I don't know if those get handled correctly of if they are the cause of your error.
You also might want to take a look at the commented config file for imap. There is a section related to gmail, so perhaps you should try using some other settings when using gmail. I sadly can't really help with the gmail stuff as I don't use it.

Offline

Board footer

Powered by FluxBB