Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tornado-4.3-py2.7-linux-x86_64.egg/tornado/web.py", line 1443, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "/home/simon/myblog/handlers.py", line 53, in get
self.render_string('login.html')
File "/usr/local/lib/python2.7/dist-packages/tornado-4.3-py2.7-linux-x86_64.egg/tornado/web.py", line 806, in render_string
return t.generate(**namespace)
File "/usr/local/lib/python2.7/dist-packages/tornado-4.3-py2.7-linux-x86_64.egg/tornado/template.py", line 345, in generate
return execute()
File "login_html.generated.py", line 9, in _tt_execute
_tt_tmp = _tt_utf8(True(_tt_tmp)) # login.html:37
TypeError: 'bool' object is not callable
我handlers里的设置如下
class LoginHandler(BaseHandler):
def get(self):
self.render_string('login.html')
app里面设置的r'/login'指向LoginHandler,html模板也换成非tornado渲染的,怎么还是会出错?不应该啊...
报错信息里有了啊
tt_tmp = _tt_utf8(True(_tt_tmp))
True() 这个写法不对,bool值不能当作方法名