imapclient icon indicating copy to clipboard operation
imapclient copied to clipboard

Tuple index out of range while calling FETCH

Open paketep opened this issue 4 years ago • 0 comments

Sadly, I don't have access anymore to the email that caused it, but rather than an IndexError, it would be better to raise some kind of MalformedEmailException or similar. This is the relevant part of the stack trace:

  File "/venv/lib/python3.8/site-packages/imapclient/imapclient.py", line 1370, in fetch
    return parse_fetch_response(data, self.normalise_times, self.use_uid)

  File "/venv/lib/python3.8/site-packages/imapclient/response_parser.py", line 149, in parse_fetch_response
    msg_data[word] = _convert_ENVELOPE(value, normalise_times)

  File "/venv/lib/python3.8/site-packages/imapclient/response_parser.py", line 205, in _convert_ENVELOPE
    message_id=envelope_response[9]

IndexError: tuple index out of range

The same goes for the error reported in issue #347, which I've also seen from time to time.

Thank you!

paketep avatar Oct 01 '21 14:10 paketep