gauteh / lieer

Fast email-fetching and sending and two-way tag synchronization between notmuch and GMail
http://lieer.gaute.vetsj.com
Other
494 stars 60 forks source link

gmi send error on dry-run #259

Closed mechanicalamit closed 6 months ago

mechanicalamit commented 6 months ago

Using Release v1.5 (commit 85f515125)

path: /home/user/notmuch/
dry-run:  True
sending message, from: Amit Dhingra <fakemail@gmail.com>..
Traceback (most recent call last):
  File "/home/user/build/lieer/./gmi", line 24, in <module>
    g.main ()
  File "/home/user/build/lieer/lieer/gmailieer.py", line 418, in main
    args.func(args)
  File "/home/user/build/lieer/lieer/gmailieer.py", line 1099, in send
    self.vprint("message sent successfully: %s" % msg["id"])
                                                  ~~~^^^^^^
TypeError: byte indices must be integers or slices, not str

I think msg is assigned (again) in line 1093 which is not dry_run, so does not get assigned during the dry-run.

The print line 1097 is outside and errors since msg has stale data from stdin.read() on line 1021

gauteh commented 6 months ago

Fixed in #260.