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

Timestamp Parsing: IndexError: string index out of range #347

Closed
jsonbank opened this issue Feb 23, 2018 · 2 comments
Closed

Timestamp Parsing: IndexError: string index out of range #347

jsonbank opened this issue Feb 23, 2018 · 2 comments

Comments

@jsonbank
Copy link

Here is the stacktrace:

Traceback (most recent call last):
<REMOVED WHERE WE CALL FETCH>
  File "/var/task/imapclient/imapclient.py", line 1130, in fetch
    return parse_fetch_response(data, self.normalise_times, self.use_uid)
  File "/var/task/imapclient/response_parser.py", line 144, in parse_fetch_response
    msg_data[word] = _convert_ENVELOPE(value, normalise_times)
  File "/var/task/imapclient/response_parser.py", line 177, in _convert_ENVELOPE
    dt = parse_to_datetime(envelope_response[0], normalise=normalise_times)
  File "/var/task/imapclient/datetime_util.py", line 25, in parse_to_datetime
    time_tuple = parsedate_tz(_munge(timestamp))
  File "/usr/lib64/python2.7/email/utils.py", line 210, in parsedate_tz
    return _parsedate_tz(data)
  File "/usr/lib64/python2.7/email/_parseaddr.py", line 90, in parsedate_tz
    if not yy[0].isdigit():
IndexError: string index out of range

I will try and find the offending values living on the IMAP server. Since this is reproducible.

@mjs
Copy link
Owner

mjs commented Aug 27, 2018

Hi @jsonbank. If you can provide an example input that causes this, we should be able to fix it.

@mjs
Copy link
Owner

mjs commented Sep 28, 2021

Closing due to lack of activity.

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