simplegmail icon indicating copy to clipboard operation
simplegmail copied to clipboard

calling archive() on a message causes Exception KeyError: labelIds

Open bwagner opened this issue 4 years ago • 1 comments

File "myprog.py", line 49, in main m.archive() File "...python/3.10.1/lib/python3.10/site-packages/simplegmail/message.py", line 218, in archive self.remove_label(label.INBOX) File "...python/3.10.1/lib/python3.10/site-packages/simplegmail/message.py", line 328, in remove_label self.remove_labels([to_remove]) File "...python/3.10.1/lib/python3.10/site-packages/simplegmail/message.py", line 343, in remove_labels self.modify_labels([], to_remove) File "...python/3.10.1/lib/python3.10/site-packages/simplegmail/message.py", line 381, in modify_labels and all([lbl not in res['labelIds'] for lbl in to_remove]),
File "...python/3.10.1/lib/python3.10/site-packages/simplegmail/message.py", line 381, in and all([lbl not in res['labelIds'] for lbl in to_remove]),
KeyError: 'labelIds'

Workaround: Ignore KeyError

bwagner avatar Dec 18 '21 08:12 bwagner

@bwagner thanks for reporting this, will fix the issue shortly.

jeremyephron avatar Dec 20 '21 02:12 jeremyephron