Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bwagner opened this issue Dec 18, 2021 · 1 comment
Open

Comments

@bwagner
Copy link

bwagner commented Dec 18, 2021

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

@jeremyephron
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants