bottle框架html代码报错
我是用handlebars来渲染html的
可是运行就报错,有人知道是为什么么
Error: 500 Internal Server Error
Sorry, the requested URL 'http://127.0.0.1:5432/' caused an error:
Internal Server Error
Exception:
SyntaxError('invalid syntax', ('/Users/Jyue/Desktop/code/exercises/2018-05-31/views/index.html', 21, 30, "' ', _str(/each), '\\n'\\\n"))
Traceback:
Traceback (most recent call last):
File "/Users/Jyue/venv1/lib/python3.6/site-packages/bottle.py", line 862, in _handle
return route.call(**args)
File "/Users/Jyue/venv1/lib/python3.6/site-packages/bottle.py", line 1740, in wrapper
rv = callback(*a, **ka)
File "/Users/Jyue/Desktop/code/exercises/2018-05-31/main.py", line 48, in index
return template('index')
File "/Users/Jyue/venv1/lib/python3.6/site-packages/bottle.py", line 3619, in template
return TEMPLATES[tplid].render(kwargs)
File "/Users/Jyue/venv1/lib/python3.6/site-packages/bottle.py", line 3409, in render
self.execute(stdout, env)
File "/Users/Jyue/venv1/lib/python3.6/site-packages/bottle.py", line 3396, in execute
eval(self.co, env)
File "/Users/Jyue/venv1/lib/python3.6/site-packages/bottle.py", line 189, in __get__
value = obj.__dict__[self.func.__name__] = self.func(obj)
File "/Users/Jyue/venv1/lib/python3.6/site-packages/bottle.py", line 3354, in co
return compile(self.code, self.filename or '<string>', 'exec')
File "/Users/Jyue/Desktop/code/exercises/2018-05-31/views/index.html", line 21
' ', _str(/each), '\n'\
^
SyntaxError: invalid syntax
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论