Guest User

message.as_bytes() maximum recursion depth exceeded

a guest
Oct 21st, 2014
326
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Traceback (most recent call last):
  2.   File "/usr/local/lib/python3.4/dist-packages/flask/app.py", line 1817, in wsgi_app
  3.     response = self.full_dispatch_request()
  4.   File "/usr/local/lib/python3.4/dist-packages/flask/app.py", line 1477, in full_dispatch_request
  5.     rv = self.handle_user_exception(e)
  6.   File "/usr/local/lib/python3.4/dist-packages/flask/app.py", line 1381, in handle_user_exception
  7.     reraise(exc_type, exc_value, tb)
  8.   File "/usr/local/lib/python3.4/dist-packages/flask/_compat.py", line 33, in reraise
  9.     raise value
  10.   File "/usr/local/lib/python3.4/dist-packages/flask/app.py", line 1475, in full_dispatch_request
  11.     rv = self.dispatch_request()
  12.   File "/usr/local/lib/python3.4/dist-packages/flask/app.py", line 1461, in dispatch_request
  13.     return self.view_functions[rule.endpoint](**req.view_args)
  14.     ....
  15.   File "./utils/mailer.py", line 98, in send_multiple_tickets
  16.     send_async_email(msg)
  17.   File "./utils/mailer.py", line 25, in send_async_email
  18.     mail.send(msg)
  19.   File "/usr/local/lib/python3.4/dist-packages/flask_mail.py", line 492, in send
  20.     message.send(connection)
  21.   File "/usr/local/lib/python3.4/dist-packages/flask_mail.py", line 427, in send
  22.     connection.send(self)
  23.   File "/usr/local/lib/python3.4/dist-packages/flask_mail.py", line 190, in send
  24.     message.as_bytes() if PY3 else message.as_string(),
  25.   File "/usr/local/lib/python3.4/dist-packages/flask_mail.py", line 385, in as_bytes
  26.     return self._message().as_bytes()
  27.   File "/usr/lib/python3.4/email/message.py", line 178, in as_bytes
  28.     g.flatten(self, unixfrom=unixfrom)
  29.   File "/usr/lib/python3.4/email/generator.py", line 109, in flatten
  30.     self._write(msg)
  31.   File "/usr/lib/python3.4/email/generator.py", line 175, in _write
  32.     self._dispatch(msg)
  33.   File "/usr/lib/python3.4/email/generator.py", line 208, in _dispatch
  34.     meth(msg)
  35.   File "/usr/lib/python3.4/email/generator.py", line 266, in _handle_multipart
  36.     g.flatten(part, unixfrom=False, linesep=self._NL)
  37.   File "/usr/lib/python3.4/email/generator.py", line 109, in flatten
  38.     self._write(msg)
  39.   File "/usr/lib/python3.4/email/generator.py", line 189, in _write
  40.     self._write_headers(msg)
  41.   File "/usr/lib/python3.4/email/generator.py", line 416, in _write_headers
  42.     self._fp.write(self.policy.fold_binary(h, v))
  43.   File "/usr/lib/python3.4/email/policy.py", line 179, in fold_binary
  44.     folded = self._fold(name, value, refold_binary=self.cte_type=='7bit')
  45.   File "/usr/lib/python3.4/email/policy.py", line 192, in _fold
  46.     return self.header_factory(name, ''.join(lines)).fold(policy=self)
  47.   File "/usr/lib/python3.4/email/headerregistry.py", line 252, in fold
  48.     return header.fold(policy=policy)
  49.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 299, in fold
  50.     self._fold(folded)
  51.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 1205, in _fold
  52.     rest._fold(folded)
  53.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 345, in _fold
  54.     if folded.append_if_fits(part):
  55.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 148, in append_if_fits
  56.     token._fold(self)
  57.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 336, in _fold
  58.     if folded.append_if_fits(part, tstr):
  59.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 148, in append_if_fits
  60.     token._fold(self)
  61.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 336, in _fold
  62.     if folded.append_if_fits(part, tstr):
  63.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 148, in append_if_fits
  64.     token._fold(self)
  65.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 336, in _fold
  66.     if folded.append_if_fits(part, tstr):
  67.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 148, in append_if_fits
  68.     token._fold(self)
  69.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 336, in _fold
  70.     if folded.append_if_fits(part, tstr):
  71.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 148, in append_if_fits
  72.     token._fold(self)
  73.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 336, in _fold
  74.     if folded.append_if_fits(part, tstr):
  75.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 148, in append_if_fits
  76.     token._fold(self)
  77.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 336, in _fold
  78.     if folded.append_if_fits(part, tstr):
  79.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 148, in append_if_fits
  80.     token._fold(self)
  81.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 336, in _fold
  82.     if folded.append_if_fits(part, tstr):
  83.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 148, in append_if_fits
  84.     token._fold(self)
  85.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 336, in _fold
  86.     if folded.append_if_fits(part, tstr):
  87.     ... many fucking lines removed ...
  88.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 336, in _fold
  89.     if folded.append_if_fits(part, tstr):
  90.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 148, in append_if_fits
  91.     token._fold(self)
  92.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 323, in _fold
  93.     tstr = str(part)
  94.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 195, in __str__
  95.     return ''.join(str(x) for x in self)
  96.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 195, in <genexpr>
  97.     return ''.join(str(x) for x in self)
  98.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 195, in __str__
  99.     return ''.join(str(x) for x in self)
  100.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 195, in <genexpr>
  101.     return ''.join(str(x) for x in self)
  102.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 195, in __str__
  103.     return ''.join(str(x) for x in self)
  104.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 195, in <genexpr>
  105.     return ''.join(str(x) for x in self)
  106.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 629, in __str__
  107.     return quote_string(''.join(str(x) for x in self))
  108.   File "/usr/lib/python3.4/email/_header_value_parser.py", line 629, in <genexpr>
  109.     return quote_string(''.join(str(x) for x in self))
  110. RuntimeError: maximum recursion depth exceeded while calling a Python object
RAW Paste Data