使用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=

最佳答案

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

@app.route('/')

关于python - AttributeError:“Flask”对象没有属性“rout”,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/20648272/

10-12 20:07