#๐Ÿ”’ imaplib exception

4 messages ยท Page 1 of 1 (latest)

granite sphinx
#
num = str(x_gm_msgid).encode()
result, raw_imap_msg_data = self.srv.uid('FETCH', num, "(RFC822 X-GM-MSGID)")

i keep getting an exception on some (not all) x-gm-msgid numbers is there someone around here that might have some insight on the cause to this issue? ive been looking at this line of code for a week without positive results.
Error during email fetch attempt 1: UID command error: BAD [b'Could not parse command']
i have tried both the fetch() method and the uid(). UIDPLUS is not supported by the server. its a gmail server hence the X-GM-MSGID lookups.
value of num at time of exception is: b'1760934730365233422' which looks to be valid. the only thing i can think of is that the ID doesnt exisat on the server side (which is concerning since i just got the ID from the server using a search and fetch. the mailbox has been selected and the state of the connection is self.srv.state = 'SELECTED' the only thing i can think of the select() method i didnt set the readonly flag to False

vast sandalBOT
#

@granite sphinx

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

vast sandalBOT
#

@granite sphinx

Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.