gmail importer script
Patrick Totzke
patricktotzke at gmail.com
Sat Dec 8 08:20:55 PST 2012
Quoting Jason A. Donenfeld (2012-12-07 13:49:46)
> Not sure what is causing this. My best guess is that your password was
> incorrect and that I'm not checking the login return value.
Yes, you're right, it was an incorrect passwd.
> One thing you also might want to watch out for is
> exceptions due to a locked notmuch index.
>
>
> How do I do this?
See e.g. here: https://github.com/pazz/alot/blob/master/alot/db/manager.py#L163
I'm sure "afew" (https://github.com/teythoon/afew) does a similar thing.
I have two new errors:
---------------------------------------------------------
./gmail-notmuch.py -u patricktotzke at gmail.com -p mypwd ~/mail/gmail/
Logging in...
Selecting all mail...
Error opening database at /home/pazz/mail/gmail/.notmuch: No such file or directory
Traceback (most recent call last):
File "./gmail-notmuch.py", line 225, in <module>
main()
File "./gmail-notmuch.py", line 56, in main
database = notmuch.Database(destination, False, notmuch.Database.MODE.READ_WRITE)
File "/home/pazz/.local/lib/python2.7/site-packages/notmuch/database.py", line 154, in __init__
self.open(path, mode)
File "/home/pazz/.local/lib/python2.7/site-packages/notmuch/database.py", line 214, in open
raise NotmuchError(status)
notmuch.errors.FileError
---------------------------------------------------------
I also tried with maildir param ~/mail/gmail/\[Google\ Mail\].All\ Mail
as this is where my all-mail maildir is, and i also tried an absolute path, all the same result.
If I point it to the root of my notmuch directory I get:
---------------------------------------------------------
[~/projects/gmail-notmuch] ./gmail-notmuch.py -u patricktotzke at gmail.com -p mypwd /home/pazz/mail
Logging in...
Selecting all mail...
Traceback (most recent call last):
File "./gmail-notmuch.py", line 225, in <module>
main()
File "./gmail-notmuch.py", line 58, in main
messages = discover_messages(imap, total)
File "./gmail-notmuch.py", line 104, in discover_messages
new_readline.progressbar = create_progressbar("Receiving message list", total).start()
File "./gmail-notmuch.py", line 147, in create_progressbar
return ProgressBar(maxval=total, widgets=[text + ": ", SimpleProgress(), Bar(), Percentage(), " ", ETA(), " ", FileTransferSpeed(unit="emails")])
TypeError: __init__() got an unexpected keyword argument 'unit'
BTW: I had to change the hardcoded "[Gmail]" to "[Google Mail]" for it to get that far.
HTH,
/p
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: signature
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20121208/9817067c/attachment-0001.pgp>
More information about the notmuch
mailing list