AttributeError:'Flask'对象没有属性'rout'

时间:2013-12-18 01:49:33

标签: python heroku

使用heroku时,我试图启动我的应用程序,但不久后就崩溃了。我输入了

heroku logs

它给了我一个错误

AttributeError: 'Flask' object has no attribute 'rout' 

任何帮助?

以下是一些错误代码

2013-12-18T01:35:42.281842+00:00 app[web.1]:     __import__(module)
2013-12-18T01:35:42.282303+00:00 app[web.1]:     @app.rout('/')
2013-12-18T01:35:42.282303+00:00 app[web.1]: AttributeError: 'Flask' object has no attribute 'rout'
2013-12-18T01:35:42.292705+00:00 app[web.1]: 2013-12-18 01:35:42 [7] [INFO] Worker exiting (pid: 7)
2013-12-18T01:35:42.281842+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load_wsgiapp
2013-12-18T01:35:42.492900+00:00 app[web.1]: 2013-12-18 01:35:42 [2] [INFO] Shutting down: Master
2013-12-18T01:35:42.492900+00:00 app[web.1]: 2013-12-18 01:35:42 [2] [INFO] Reason: Worker failed to boot.
2013-12-18T01:35:43.735731+00:00 heroku[web.1]: State changed from up to crashed
2013-12-18T01:35:43.722240+00:00 heroku[web.1]: Process exited with status 3
2013-12-18T01:35:48.270010+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=boiling-journey-3522.herokuapp.com fwd="24.6.156.230" dyno= connect= service= status=503 bytes=

1 个答案:

答案 0 :(得分:6)

我相信这是一个错字。应该是

@app.route('/')