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
AttributeError: '_NullFuture' object has no attribute 'add_done_callback' #3287
Comments
Hmm, I've never seen that and I'm not quite sure how you'd get there. Are you overriding RequestHandler._execute somehow? |
What you've written is unnecessarily complicated and, not to mention, results in error. Instead of patching |
Hi, |
On the file provided by @dryalcinmehmet, there is an options method decorated with |
No, tornado.gen.coroutine should still use a real future in this case. I don't see exactly where the _NullFuture is coming from, but this interceptor decorator is problematic in a number of ways. Wrapping _execute without actually calling the underlying _execute method is probably going to break something, as is discarding the return value of the real _execute method. I agree with @bhch that you should not be overriding |
Hi,
I deployed tornado web with these versions.
Ubuntu 18.04 Python 3.11.4 Tornado 6.3.2
I couldn't solve the issue as you see below.
Currently, we use Tornado 5.0.2 and Python 3.6.9 versions. We decided upgrade python to 3.11.4 and all packages. I tried versions of tornado from 5.0 to 6.3.2, but couldn't solve.
E 230620 15:07:01 http1connection:67] Uncaught exception Traceback (most recent call last): File "/home/shippn/.pyenv/versions/venv/lib/python3.11/site-packages/tornado/http1connection.py", line 276, in _read_message delegate.finish() File "/home/shippn/.pyenv/versions/venv/lib/python3.11/site-packages/tornado/routing.py", line 268, in finish self.delegate.finish() File "/home/shippn/.pyenv/versions/venv/lib/python3.11/site-packages/tornado/web.py", line 2395, in finish self.execute() File "/home/shippn/.pyenv/versions/venv/lib/python3.11/site-packages/tornado/web.py", line 2434, in execute fut.add_done_callback(lambda f: f.result()) ^^^^^^^^^^^^^^^^^^^^^ AttributeError: '_NullFuture' object has no attribute 'add_done_callback'
The text was updated successfully, but these errors were encountered: