calling archive() on a message causes Exception KeyError: labelIds
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
KeyError: 'labelIds'
Workaround: Ignore KeyError
@bwagner thanks for reporting this, will fix the issue shortly.