Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
3.7.0a1 (default, Oct 17 2017, 17:08:18)
[GCC 6.3.0 20170516]
Traceback (most recent call last):
File "t.py", line 14, in <module>
print(mail)
File "/home/altendky/.pyenv/versions/3.7.0a1/lib/python3.7/email/message.py", line 971, in __str__
return self.as_string(policy=self.policy.clone(utf8=True))
File "/home/altendky/.pyenv/versions/3.7.0a1/lib/python3.7/email/message.py", line 968, in as_string
return super().as_string(maxheaderlen=maxheaderlen, policy=policy)
File "/home/altendky/.pyenv/versions/3.7.0a1/lib/python3.7/email/message.py", line 158, in as_string
g.flatten(self, unixfrom=unixfrom)
File "/home/altendky/.pyenv/versions/3.7.0a1/lib/python3.7/email/generator.py", line 116, in flatten
self._write(msg)
File "/home/altendky/.pyenv/versions/3.7.0a1/lib/python3.7/email/generator.py", line 181, in _write
self._dispatch(msg)
File "/home/altendky/.pyenv/versions/3.7.0a1/lib/python3.7/email/generator.py", line 214, in _dispatch
meth(msg)
File "/home/altendky/.pyenv/versions/3.7.0a1/lib/python3.7/email/generator.py", line 272, in _handle_multipart
g.flatten(part, unixfrom=False, linesep=self._NL)
File "/home/altendky/.pyenv/versions/3.7.0a1/lib/python3.7/email/generator.py", line 116, in flatten
self._write(msg)
File "/home/altendky/.pyenv/versions/3.7.0a1/lib/python3.7/email/generator.py", line 195, in _write
self._write_headers(msg)
File "/home/altendky/.pyenv/versions/3.7.0a1/lib/python3.7/email/generator.py", line 222, in _write_headers
self.write(self.policy.fold(h, v))
File "/home/altendky/.pyenv/versions/3.7.0a1/lib/python3.7/email/policy.py", line 183, in fold
return self._fold(name, value, refold_binary=True)
File "/home/altendky/.pyenv/versions/3.7.0a1/lib/python3.7/email/policy.py", line 205, in _fold
return value.fold(policy=self)
File "/home/altendky/.pyenv/versions/3.7.0a1/lib/python3.7/email/headerregistry.py", line 255, in fold
return header.fold(policy=policy)
File "/home/altendky/.pyenv/versions/3.7.0a1/lib/python3.7/email/_header_value_parser.py", line 300, in fold
self._fold(folded)
File "/home/altendky/.pyenv/versions/3.7.0a1/lib/python3.7/email/_header_value_parser.py", line 1226, in _fold
rest._fold(folded)
File "/home/altendky/.pyenv/versions/3.7.0a1/lib/python3.7/email/_header_value_parser.py", line 345, in _fold
if folded.append_if_fits(part):
File "/home/altendky/.pyenv/versions/3.7.0a1/lib/python3.7/email/_header_value_parser.py", line 145, in append_if_fits
ws = token.pop_leading_fws()
File "/home/altendky/.pyenv/versions/3.7.0a1/lib/python3.7/email/_header_value_parser.py", line 272, in pop_leading_fws
return self[0].pop_leading_fws()
File "/home/altendky/.pyenv/versions/3.7.0a1/lib/python3.7/email/_header_value_parser.py", line 272, in pop_leading_fws
return self[0].pop_leading_fws()
File "/home/altendky/.pyenv/versions/3.7.0a1/lib/python3.7/email/_header_value_parser.py", line 270, in pop_leading_fws
if self[0].token_type == 'fws':
IndexError: list index out of range
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.