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

运行报错,页面无响应 #1

Open
Nullthingxs opened this issue Jun 18, 2019 · 1 comment
Open

运行报错,页面无响应 #1

Nullthingxs opened this issue Jun 18, 2019 · 1 comment

Comments

@Nullthingxs
Copy link

`ERROR:tornado.application:Uncaught exception GET / (127.0.0.1)
HTTPServerRequest(protocol='http', host='127.0.0.1:9000', method='GET', uri='/', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
File "/www/wwwroot/ctf/CTF_venv/lib/python3.7/site-packages/tornado/web.py", line 1697, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "/www/wwwroot/ctf/view/index.py", line 8, in get
self.render(nav='index')
File "/www/wwwroot/ctf/view/init.py", line 149, in render
self.finish(tmpl.render(**kwargs))
File "/www/wwwroot/ctf/CTF_venv/lib/python3.7/site-packages/tornado/web.py", line 1154, in finish
future = self.flush(include_footers=True)
File "/www/wwwroot/ctf/view/init.py", line 174, in flush
super(View, self).flush(include_footers, callback)
TypeError: flush() takes from 1 to 2 positional arguments but 3 were given
ERROR:tornado.application:Uncaught exception in write_error
Traceback (most recent call last):
File "/www/wwwroot/ctf/CTF_venv/lib/python3.7/site-packages/tornado/web.py", line 1697, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "/www/wwwroot/ctf/view/index.py", line 8, in get
self.render(nav='index')
File "/www/wwwroot/ctf/view/init.py", line 149, in render
self.finish(tmpl.render(**kwargs))
File "/www/wwwroot/ctf/CTF_venv/lib/python3.7/site-packages/tornado/web.py", line 1154, in finish
future = self.flush(include_footers=True)
File "/www/wwwroot/ctf/view/init.py", line 174, in flush
super(View, self).flush(include_footers, callback)
TypeError: flush() takes from 1 to 2 positional arguments but 3 were given

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/www/wwwroot/ctf/CTF_venv/lib/python3.7/site-packages/tornado/web.py", line 1214, in send_error
self.write_error(status_code, **kwargs)
File "/www/wwwroot/ctf/CTF_venv/lib/python3.7/site-packages/tornado/web.py", line 1242, in write_error
% {"code": status_code, "message": self._reason}
File "/www/wwwroot/ctf/CTF_venv/lib/python3.7/site-packages/tornado/web.py", line 1154, in finish
future = self.flush(include_footers=True)
File "/www/wwwroot/ctf/view/init.py", line 174, in flush
super(View, self).flush(include_footers, callback)
TypeError: flush() takes from 1 to 2 positional arguments but 3 were given
ERROR:tornado.application:Exception in exception handler
Traceback (most recent call last):
File "/www/wwwroot/ctf/CTF_venv/lib/python3.7/site-packages/tornado/web.py", line 1697, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "/www/wwwroot/ctf/view/index.py", line 8, in get
self.render(nav='index')
File "/www/wwwroot/ctf/view/init.py", line 149, in render
self.finish(tmpl.render(**kwargs))
File "/www/wwwroot/ctf/CTF_venv/lib/python3.7/site-packages/tornado/web.py", line 1154, in finish
future = self.flush(include_footers=True)
File "/www/wwwroot/ctf/view/init.py", line 174, in flush
super(View, self).flush(include_footers, callback)
TypeError: flush() takes from 1 to 2 positional arguments but 3 were given

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/www/wwwroot/ctf/CTF_venv/lib/python3.7/site-packages/tornado/web.py", line 1704, in _execute
self._handle_request_exception(e)
File "/www/wwwroot/ctf/CTF_venv/lib/python3.7/site-packages/tornado/web.py", line 1761, in _handle_request_exception
self.send_error(500, exc_info=sys.exc_info())
File "/www/wwwroot/ctf/CTF_venv/lib/python3.7/site-packages/tornado/web.py", line 1218, in send_error
self.finish()
File "/www/wwwroot/ctf/CTF_venv/lib/python3.7/site-packages/tornado/web.py", line 1154, in finish
future = self.flush(include_footers=True)
File "/www/wwwroot/ctf/view/init.py", line 174, in flush
super(View, self).flush(include_footers, callback)
TypeError: flush() takes from 1 to 2 positional arguments but 3 were given
`

系统环境如下:python3.7,Centos7.5,

@fy0
Copy link
Owner

fy0 commented Jun 19, 2019

时代变了,tornado 6.0 移除了 callback 参数,你直接把那行

super(View, self).flush(include_footers, callback)

改成

super(View, self).flush(include_footers)

应该就行了
https://www.tornadoweb.org/en/stable/web.html#tornado.web.RequestHandler.flush

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