From: Patrick Totzke <patricktotzke@gmail.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>,
Cc: public-notmuch-gxuj+Tv9EO5zyzON3hdc1g@plane.gmane.org,
notmuch@notmuchmail.org, Rainer M Krug <R.M.Krug@gmail.com>
Subject: Re: gmail importer script
Date: Sat, 08 Dec 2012 17:46:26 +0000 [thread overview]
Message-ID: <20121208174626.23685.31363@brick.lan> (raw)
In-Reply-To: <CAHmME9obAbvmXDJnQDGhSonADQYJr55gT4m62jkiWv0k8zrPpA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3423 bytes --]
Quoting Jason A. Donenfeld (2012-12-08 17:04:48)
> On Sat, Dec 8, 2012 at 5:20 PM, Patrick Totzke <patricktotzke@gmail.com> wrote:
> > I have two new errors:
> >
> > ---------------------------------------------------------
> > ./gmail-notmuch.py -u patricktotzke@gmail.com -p mypwd ~/mail/gmail/
> >
> > 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:
>
> Pointing it at the root directory is what you want. In fact, I'm
> removing the argument from the script and having it just get that from
> the config. So the correct invocation will be:
>
> ./gmail-notmuch.py -u blabla -p password
Okay..
>
> > 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'
>
> You're probably running with an old version of python-statusbar.
I just installed it from ubuntu 12.04's repository. the version was 2.2-2.
Installed from pip now, and it seems ok. you'll want to make more specific dependencies at some
point..
> >
> > BTW: I had to change the hardcoded "[Gmail]" to "[Google Mail]" for it to get that far.
>
> Really? Are you in the UK? I'll have to do this dynamically using the
> XLIST imap extension.
Yea, but its a *really* old account I first got from google.de.
Reading this dynamically would def. help.
next try..
-----------------------------------------------------------------
Traceback (most recent call last):
File "./gmail-notmuch.py", line 246, in <module>
main()
File "./gmail-notmuch.py", line 74, in main
new_messages = retag_old_messages(database, messages, destination)
File "./gmail-notmuch.py", line 176, in retag_old_messages
progressbar.start()
File "/usr/local/lib/python2.7/dist-packages/progressbar/__init__.py", line 311, in start
self.update(0)
File "/usr/local/lib/python2.7/dist-packages/progressbar/__init__.py", line 283, in update
self.fd.write(self._format_line() + '\r')
File "/usr/local/lib/python2.7/dist-packages/progressbar/__init__.py", line 243, in _format_line
widgets = ''.join(self._format_widgets())
File "/usr/local/lib/python2.7/dist-packages/progressbar/__init__.py", line 223, in _format_widgets
widget = format_updatable(widget, self)
File "/usr/local/lib/python2.7/dist-packages/progressbar/widgets.py", line 38, in format_updatable
if hasattr(updatable, 'update'): return updatable.update(pbar)
File "/usr/local/lib/python2.7/dist-packages/progressbar/widgets.py", line 184, in update
return '%3d%%' % pbar.percentage()
File "/usr/local/lib/python2.7/dist-packages/progressbar/__init__.py", line 208, in percentage
return self.currval * 100.0 / self.maxval
ZeroDivisionError: float division by zero
--------------------------------------------------------------------------
Another feature request:
Could you make the progressbar stuff optinal? in the end one will want to run this via cronjob
and this shouldn't print anything to stdout.
Also, I can pretty much recommend the 'logging' module.
cheers,
/p
[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iEYEABECAAYFAlDDfPIACgkQlDQDZ9fWxaoN0wCfSDu1vUlfji9mYFPRdlzM6LFC
k6kAoKDA7JIWG/JMQQn1S8SmyxTfrnco
=NABV
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2012-12-08 17:46 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-07 0:24 gmail importer script Jason A. Donenfeld
2012-12-07 4:05 ` Kushal Kumaran
2012-12-07 8:53 ` Rainer M Krug
2012-12-07 9:23 ` Patrick Totzke
2012-12-07 13:49 ` Jason A. Donenfeld
2012-12-08 16:20 ` Patrick Totzke
2012-12-08 17:04 ` Jason A. Donenfeld
2012-12-08 17:19 ` Jason A. Donenfeld
[not found] ` <20121213141917.GD3658@tungsten.lan.mitsi.com>
[not found] ` <CAHmME9op8V+ZJGVwBJPZ653mHYBnMAvxb426LAP-Bu27-rzmYA@mail.gmail.com>
2012-12-13 15:23 ` fREW Schmidt
2012-12-13 15:24 ` Jason A. Donenfeld
2012-12-13 16:48 ` Patrick Totzke
2012-12-15 8:22 ` Jason A. Donenfeld
2012-12-15 10:41 ` Patrick Totzke
2012-12-16 20:44 ` Jason A. Donenfeld
2012-12-16 22:31 ` Patrick Totzke
2012-12-17 8:31 ` Patrick Totzke
2012-12-08 17:46 ` Patrick Totzke [this message]
2012-12-09 23:13 ` Jason A. Donenfeld
2012-12-10 9:41 ` Patrick Totzke
2012-12-10 17:46 ` Jason A. Donenfeld
2012-12-11 7:06 ` Jason A. Donenfeld
2012-12-11 9:12 ` Patrick Totzke
2012-12-11 9:12 ` Jason A. Donenfeld
2012-12-11 10:04 ` Patrick Totzke
[not found] ` <20121213142228.GE3658@tungsten.lan.mitsi.com>
2012-12-13 14:30 ` Jason A. Donenfeld
2012-12-13 14:35 ` fREW Schmidt
2012-12-13 15:15 ` Jason A. Donenfeld
2012-12-07 13:48 ` Jason A. Donenfeld
2012-12-07 13:57 ` Rainer M Krug
2012-12-07 15:32 ` Jason A. Donenfeld
2012-12-08 12:40 ` Rainer M Krug
2012-12-08 13:15 ` Jason A. Donenfeld
2012-12-10 9:12 ` Rainer M Krug
2012-12-07 15:30 ` Jason A. Donenfeld
2012-12-07 11:48 ` [PATCH] Minor style changes Michal Nazarewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121208174626.23685.31363@brick.lan \
--to=patricktotzke@gmail.com \
--cc=Jason@zx2c4.com \
--cc=R.M.Krug@gmail.com \
--cc=notmuch@notmuchmail.org \
--cc=public-notmuch-gxuj+Tv9EO5zyzON3hdc1g@plane.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).