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

AssertionError: Already reading #16

Open
ballagas opened this issue Oct 9, 2014 · 0 comments
Open

AssertionError: Already reading #16

ballagas opened this issue Oct 9, 2014 · 0 comments

Comments

@ballagas
Copy link
Contributor

ballagas commented Oct 9, 2014

I periodically run into this AssertionError when sending mail. The culprit seems to be line 356 in getreply,
line = yield gen.Task(self.sock.read_until, '\n')
but I'm not sure about the proper fix. Posting here for discussion.

[E 141009 17:15:23 ioloop:491] Exception in callback <functools.partial object at 0x7f1460c62c00>
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tornado/ioloop.py", line 477, in _run_callback
callback()
File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 331, in wrapped
raise_exc_info(exc)
File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 302, in wrapped
ret = fn(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/tornado/iostream.py", line 354, in wrapper
callback(_args)
File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 331, in wrapped
raise_exc_info(exc)
File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 343, in _handle_exception
if tail.exit(_exc):
File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 186, in exit
return self.exception_handler(type, value, traceback)
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 142, in handle_exception
return runner.handle_exception(typ, value, tb)
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 580, in handle_exception
self.run()
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 529, in run
yielded = self.gen.throw(_exc_info)
File "/usr/local/lib/python2.7/dist-packages/tornadomail/message.py", line 260, in send
result = yield gen.Task(self.get_connection(fail_silently).send_messages, [self])
File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 343, in _handle_exception
if tail.exit(_exc):
File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 186, in exit
return self.exception_handler(type, value, traceback)
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 142, in handle_exception
return runner.handle_exception(typ, value, tb)
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 580, in handle_exception
self.run()
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 529, in run
yielded = self.gen.throw(_exc_info)
File "/usr/local/lib/python2.7/dist-packages/tornadomail/backends/smtp.py", line 88, in send_messages
sent = yield gen.Task(self._send, message)
File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 343, in _handle_exception
if tail.exit(_exc):
File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 186, in exit
return self.exception_handler(type, value, traceback)
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 142, in handle_exception
return runner.handle_exception(typ, value, tb)
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 580, in handle_exception
self.run()
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 529, in run
yielded = self.gen.throw(_exc_info)
File "/usr/local/lib/python2.7/dist-packages/tornadomail/backends/smtp.py", line 107, in _send
email_message.message().as_string())
File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 343, in _handle_exception
if tail.exit(_exc):
File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 186, in exit
return self.exception_handler(type, value, traceback)
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 142, in handle_exception
return runner.handle_exception(typ, value, tb)
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 580, in handle_exception
self.run()
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 529, in run
yielded = self.gen.throw(_exc_info)
File "/usr/local/lib/python2.7/dist-packages/tornadomail/smtplib.py", line 748, in sendmail
yield gen.Task(self.ehlo_or_helo_if_needed)
File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 343, in _handle_exception
if tail.exit(_exc):
File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 186, in exit
return self.exception_handler(type, value, traceback)
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 142, in handle_exception
return runner.handle_exception(typ, value, tb)
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 580, in handle_exception
self.run()
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 529, in run
yielded = self.gen.throw(_exc_info)
File "/usr/local/lib/python2.7/dist-packages/tornadomail/smtplib.py", line 552, in ehlo_or_helo_if_needed
result = yield gen.Task(self.ehlo)
File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 302, in wrapped
ret = fn(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 574, in inner
self.set_result(key, result)
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 500, in set_result
self.run()
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 529, in run
yielded = self.gen.throw(_exc_info)
File "/usr/local/lib/python2.7/dist-packages/tornadomail/smtplib.py", line 409, in ehlo
result = yield gen.Task(self.getreply)
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 557, in run
self.yield_point.start(self)
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 377, in start
self.func(_self.args, *_self.kwargs)
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 159, in wrapper
runner.run()
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 529, in run
yielded = self.gen.throw(_exc_info)
File "/usr/local/lib/python2.7/dist-packages/tornadomail/smtplib.py", line 356, in getreply
line = yield gen.Task(self.sock.read_until, '\n')
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 557, in run
self.yield_point.start(self)
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 377, in start
self.func(_self.args, **self.kwargs)
File "/usr/local/lib/python2.7/dist-packages/tornado/iostream.py", line 161, in read_until
self._set_read_callback(callback)
File "/usr/local/lib/python2.7/dist-packages/tornado/iostream.py", line 418, in _set_read_callback
assert not self._read_callback, "Already reading"
AssertionError: Already reading

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

1 participant