为何Heroku部署python应用会导致程序崩溃?

内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用

  • 回答 (1)
  • 关注 (0)
  • 查看 (132)

当我连接到python应用程序时,程序会崩溃并给出我的错误:

2018-06-16T22:59:44.633397+00:00 app[web.1]:     from flask import 
Markup
2018-06-16T22:59:44.633403+00:00 app[web.1]:   File 
"/app/.heroku/python/lib/python2.7/site-packages/flask/__init__.py", 
line 30, in <module>
2018-06-16T22:59:44.633405+00:00 app[web.1]:     from .blueprints 
import Blueprint
2018-06-16T22:59:44.633415+00:00 app[web.1]:   File 
"/app/.heroku/python/lib/python2.7/site-packages/flask/blueprints.py", 
line 13, in <module>
2018-06-16T22:59:44.729487+00:00 heroku[web.1]: State changed from 
starting to crashed
2018-06-16T22:59:44.633417+00:00 app[web.1]:     from werkzeug.urls 
import url_join
2018-06-16T22:59:44.633419+00:00 app[web.1]: ImportError: cannot 
import name url_join
2018-06-16T22:59:44.714734+00:00 heroku[web.1]: Process exited with 
status 1
2018-06-16T22:59:45.682717+00:00 heroku[router]: at=error code=H10 
desc="App crashed" method=GET path="/" host=snowfin.herokuapp.com 
request_id=0488bd20-cdf7-4f39-9665-31038b8833a9 fwd="199.192.192.168" 
dyno= connect= service= status=503 bytes= protocol=https
2018-06-16T22:59:46.227743+00:00 heroku[router]: at=error code=H10 
desc="App crashed" method=GET path="/favicon.ico" 
host=snowfin.herokuapp.com request_id=f78f7452-0266-4683-b2cb- 
fa26e8439c69 fwd="199.192.192.168" dyno= connect= service= status=503 
bytes= protocol=https

我使用的是python 2.7.15,请问该怎么解决?

提问于
用户回答回答于

扫码关注云+社区

领取腾讯云代金券

玩转腾讯云 有奖征文活动